diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-10 08:40:10 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-10 08:40:10 -0800 |
commit | 255f8d488848719de303f3fc4614e419c2aaecd7 (patch) | |
tree | d4e30734f173a3516afe7959cd85f0e27e9fb340 | |
parent | ae81f24eb744833929a02c3345810d341f7d0710 (diff) | |
download | standingwithresilience-255f8d488848719de303f3fc4614e419c2aaecd7.tar.gz standingwithresilience-255f8d488848719de303f3fc4614e419c2aaecd7.zip |
store script improvements
-rwxr-xr-x | git-maintenance/store.sh | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh index 435657a..f40dfb7 100755 --- a/git-maintenance/store.sh +++ b/git-maintenance/store.sh @@ -18,6 +18,11 @@ if ! curl -sfI "$URLPFX"/refs.aes>/dev/null; then echo "== Remember to get on internet. ==" echo echo "The wifi password for El Capitan hotel in San Francisco, CA is 84798." + echo "The front desk clerk usually opens the front door when the buzzer is rung." + echo + echo "Karl Semich started a bash/node script to log in automatically, in the" + echo "internet-access subfolder. Please replace if redone better." + echo exit 2 fi @@ -65,17 +70,17 @@ do if [ -e encrypted/"$fn" ] then echo "$fn ALREADY EXISTS LOCALLY ($packfile)" + if [ "$(cat "$packfile" | sha256sum)" = "$(decrypt < encrypted/"$fn" | $TAR -xvOf - "$packfile" | sha256sum)" ] + then + echo "$fn MATCHES CONTENT LOCALLY ($packfile)" + else + echo "$fn DOESN'T MATCH LOCAL CONTENT ($packfile)" + encrypt < "$tmpfile" > "$tmpfile".aes + mv "$tmpfile".aes encrypted/"$fn" + fi else echo "$fn IS NEW LOCALLY ($packfile)" fi - if [ "$(cat "$packfile" | sha256sum)" = "$(decrypt < encrypted/"$fn" | $TAR -xvOf - "$packfile" | sha256sum)" ] - then - echo "$fn MATCHES CONTENT LOCALLY ($packfile)" - else - echo "$fn DOESN'T MATCH LOCAL CONTENT ($packfile)" - encrypt < "$tmpfile" > "$tmpfile".aes - mv "$tmpfile".aes encrypted/"$fn" - fi # need to decrypt to compare content. if [ "$(curl "$URLPFX"/"$fn" | decrypt | $TAR -xvOf - "$packfile" | sha256sum)" = "$(cat "$packfile" | sha256sum)" ]; then echo "$fn MATCHES DOWNLOAD CONTENT ($packfile)" |