summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-maintenance/store.sh21
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)"