From 22f84a2e843b985deb9fe3f4e378e29059b16645 Mon Sep 17 00:00:00 2001 From: olpc user Date: Tue, 7 Jan 2020 16:52:56 -0800 Subject: small improvements --- git-maintenance/get.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'git-maintenance/get.sh') diff --git a/git-maintenance/get.sh b/git-maintenance/get.sh index 4af9fb0..c3322f8 100755 --- a/git-maintenance/get.sh +++ b/git-maintenance/get.sh @@ -4,7 +4,11 @@ PASS="$(ls "/run/media/"*/*"/key.fsojp.aes256" | head -n 1)" PUBKEY=1KwpZECcrGWnM3AFVSbv3Xr5qguV4yG2sV URLPFX="https://bico.media/$PUBKEY" -REPONAME="$1" +REPONAME="$(git rev-parse --show-toplevel 2>/dev/null)" +if [ "$REPONAME" = "" ] +then + REPONAME="$1" +fi if [ "$REPONAME" = "" ] then REPONAME=for-slow-organization-job-private @@ -25,7 +29,7 @@ git config gc.auto 0 mkdir -p .git/encrypted mkdir -p .git/objects/pack.bak -mv .git/objects/pack/* .git/objects/pack.bak/ +mv -f .git/objects/pack/* .git/objects/pack.bak/ # 3. download .git/encrypted with wget curl -sfI "$URLPFX"/refs.aes>/dev/null && wget "$URLPFX"/refs.aes -O .git/encrypted/refs.aes || echo "==== BROKEN REMOTE refs.aes PLEASE RE-STORE ====" -- cgit v1.2.3