diff options
Diffstat (limited to 'git-maintenance/store.sh')
-rwxr-xr-x | git-maintenance/store.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh index 99c71d7..1361226 100755 --- a/git-maintenance/store.sh +++ b/git-maintenance/store.sh @@ -42,8 +42,19 @@ do $TAR -cv "$packfile" > "$tmpfile" openssl aes-256-cbc -salt -pbkdf2 -pass "file:$PASS" -e -in "$tmpfile" -out "$tmpfile".aes fn="$({ cat "$tmpfile"; echo -n "$PASS"; } | sha256sum | cut -f 1 -d ' ')".aes + if [ -e encrypted/"$fn" ] + then + echo "$fn ALREADY EXISTS LOCALLY ($packfile)" + else + echo "$fn IS NEW LOCALLY ($packfile)" + fi mv "$tmpfile".aes encrypted/"$fn" - if [ "$(curl "$URLPFX"/"$fn" | sha256sum)" = "$(cat encrypted/"$fn" | sha256sum)" ]; then mv -v encrypted/"$fn" encrypted.bak; fi + if [ "$(curl "$URLPFX"/"$fn" | sha256sum)" = "$(cat encrypted/"$fn" | sha256sum)" ]; then + echo "$fn ALREADY EXISTS REMOTELY ($packfile)" + mv -v encrypted/"$fn" encrypted.bak + else + echo "$fn FAILED GET MATCH REMOTELY ($packfile)" + fi echo "$fn" >> "$tmpfile".list done rm "$tmpfile" |