diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-07 17:16:17 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-07 17:16:17 -0800 |
commit | d2f1d006905b5d7c4bdf9255ae050330a6a7fbaa (patch) | |
tree | 11fdc170f309640e43e585be9ad82b9f9ec6dd96 /git-maintenance/store.sh | |
parent | 4010719395c27d78a60b39c098576cc380d06b2b (diff) | |
download | standingwithresilience-d2f1d006905b5d7c4bdf9255ae050330a6a7fbaa.tar.gz standingwithresilience-d2f1d006905b5d7c4bdf9255ae050330a6a7fbaa.zip |
bugfix attempts
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" |