diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-08 17:18:44 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-08 17:18:44 -0800 |
commit | c6de0352d5798c839bea5f66e43e9663bd9028b2 (patch) | |
tree | fce111bba7349b67a31c1f835910410b05d84c01 /git-maintenance/store.sh | |
parent | 43d3d4d4951dda4db816d2a7c0cf41f960426633 (diff) | |
download | standingwithresilience-c6de0352d5798c839bea5f66e43e9663bd9028b2.tar.gz standingwithresilience-c6de0352d5798c839bea5f66e43e9663bd9028b2.zip |
script checks for environment situation first
Diffstat (limited to 'git-maintenance/store.sh')
-rwxr-xr-x | git-maintenance/store.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh index b6f87ff..c9c13c2 100755 --- a/git-maintenance/store.sh +++ b/git-maintenance/store.sh @@ -6,6 +6,11 @@ cd "$ROOTDIR" GITDIR="$ROOTDIR/.git" MAINTDIR="$ROOTDIR/git-maintenance" +PUBKEY=1KwpZECcrGWnM3AFVSbv3Xr5qguV4yG2sV +URLPFX="https://bico.media/$PUBKEY" + +if ! curl -sfI "$URLPFX"/refs.aes>/dev/null; then echo "Remember to get on internet."; exit 2; fi + # problem: IVs are producing files that do not have the same content each time, # and a reupload of everything is made each store. @@ -20,6 +25,8 @@ decrypt() { openssl aes-256-cbc -salt -pbkdf2 -pass "file:$PASS" -d } +if ! [ -e "$PASS" ]; then echo "Remember to plug in USB key."; exit 1; fi + # this approach makes it easy for karl to look at history. it is not # to be used by other channels yet, can migrate. @@ -43,8 +50,6 @@ git pack-objects --all --unpacked --incremental --non-empty --local --compressi git prune-packed tmpfile="$(mktemp)" -PUBKEY=1KwpZECcrGWnM3AFVSbv3Xr5qguV4yG2sV -URLPFX="https://bico.media/$PUBKEY" cd "$GITDIR" for packfile in objects/pack/*.pack do |