diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-07 16:16:59 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2020-01-07 16:16:59 -0800 |
commit | 8902f7a223c782e40c8869afed906712381f2519 (patch) | |
tree | da8f0a7b8923e71cfcb67d058e68b0adcdde3b82 /git-maintenance/store.sh | |
parent | cd4351906daaac3b77a2f5fe6b3a2f664e9b88b4 (diff) | |
download | standingwithresilience-8902f7a223c782e40c8869afed906712381f2519.tar.gz standingwithresilience-8902f7a223c782e40c8869afed906712381f2519.zip |
try to work around some bsvup issues
Diffstat (limited to 'git-maintenance/store.sh')
-rwxr-xr-x | git-maintenance/store.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/git-maintenance/store.sh b/git-maintenance/store.sh index b073e71..95a563b 100755 --- a/git-maintenance/store.sh +++ b/git-maintenance/store.sh @@ -14,10 +14,8 @@ TAR="tar -z --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s" # let us only upload new packfiles. # we will use a mirror folder containing encrypted files -if ! [ -d "$GITDIR"/encrypted ] -then - mkdir -p "$GITDIR"/encrypted -fi +mkdir -p "$GITDIR"/encrypted +mkdir -p "$GITDIR"/encrypted.bak if ! [ -d "$MAINTDIR"/bsvup/node_modules ] then git submodule init @@ -33,12 +31,15 @@ fi git config gc.auto 0 tmpfile="$(mktemp)" +PUBKEY=1KwpZECcrGWnM3AFVSbv3Xr5qguV4yG2sV +URLPFX="https://bico.media/$PUBKEY" for packfile in "$GITDIR"/objects/pack/*.pack 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 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 echo "$fn" >> "$tmpfile".list done rm "$tmpfile" @@ -46,6 +47,12 @@ 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 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 + + + + + # primordia is detectable due to a pattern that emerges from not being industrialized. appears resolvable with industrial history assumption, including academic degrees. name-AI-primordia, keep earth-is-god assumption? the-king? the-king-is-earth. AI works for earth. be any thing you want. silica-computer. # this junk in scriptfile is why private !!!!!!!! @@ -75,7 +82,7 @@ cp -va "$MAINTDIR"/get.sh "$GITDIR"/encrypted # some imagine anger to process disconnected parts. cd "$MAINTDIR" -node "$MAINTDIR"/bsvup/cli.js upload -f "$GITDIR"/encrypted -t none -p "$(<"$PASS")" -vb +node "$MAINTDIR"/bsvup/cli.js upload -f "$GITDIR"/encrypted -t dir -p "$(<"$PASS")" -vb # 'is this a good way to be' <- habit's task for self and others, by living # the best way to be it can. |