summaryrefslogtreecommitdiff
path: root/git-maintenance/store.sh
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-07 17:16:17 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-07 17:16:17 -0800
commitd2f1d006905b5d7c4bdf9255ae050330a6a7fbaa (patch)
tree11fdc170f309640e43e585be9ad82b9f9ec6dd96 /git-maintenance/store.sh
parent4010719395c27d78a60b39c098576cc380d06b2b (diff)
downloadstandingwithresilience-d2f1d006905b5d7c4bdf9255ae050330a6a7fbaa.tar.gz
standingwithresilience-d2f1d006905b5d7c4bdf9255ae050330a6a7fbaa.zip
bugfix attempts
Diffstat (limited to 'git-maintenance/store.sh')
-rwxr-xr-xgit-maintenance/store.sh13
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"