From 9e14e91780a4cfd496aa09930161525b50edde42 Mon Sep 17 00:00:00 2001 From: olpc user Date: Tue, 7 Jan 2020 16:39:13 -0800 Subject: testing bugs live --- git-maintenance/store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh index 03b324d..01ab4b2 100755 --- a/git-maintenance/store.sh +++ b/git-maintenance/store.sh @@ -42,12 +42,12 @@ do 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 mv "$tmpfile".aes "$GITDIR"/encrypted/"$fn" - if [ "$(curl -s "$URLPFX"/"$fn" | sha256sum)" = "$(cat "$GITDIR"/encrypted/"$fn" | sha256sum)" ]; then mv "$GITDIR"/encrypted/"$fn" "$GITDIR"/encrypted.bak; fi + if [ "$(curl "$URLPFX"/"$fn" | sha256sum)" = "$(cat "$GITDIR"/encrypted/"$fn" | sha256sum)" ]; then mv -v "$GITDIR"/encrypted/"$fn" "$GITDIR"/encrypted.bak; fi echo "$fn" >> "$tmpfile".list done rm "$tmpfile" mv "$tmpfile".list "$GITDIR"/encrypted/list.txt -$TAR -cv ""$GITDIR"/encrypted/list.txt" ""$GITDIR"/refs" ""$GITDIR"/HEAD" ""$GITDIR"/packed-refs" | openssl aes-256-cbc -salt -pbkdf2 -pass "file:$PASS" -e -out ."$GITDIR"/encrypted/refs.aes +$TAR -cv "$GITDIR"/encrypted/list.txt "$GITDIR"/refs "$GITDIR"/HEAD "$GITDIR"/packed-refs | openssl aes-256-cbc -salt -pbkdf2 -pass "file:$PASS" -e -out "$GITDIR"/encrypted/refs.aes rm "$GITDIR"/encrypted/list.txt cp -va "$MAINTDIR"/get.sh "$GITDIR"/encrypted if [ "$(curl -s "$URLPFX"/get.sh | sha256sum)" = "$(cat "$GITDIR"/encrypted/get.sh | sha256sum)" ]; then rm "$GITDIR"/encrypted/get.sh; fi -- cgit v1.2.3