summaryrefslogtreecommitdiff
path: root/git-maintenance/store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-maintenance/store.sh')
-rwxr-xr-xgit-maintenance/store.sh9
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