From 22f84a2e843b985deb9fe3f4e378e29059b16645 Mon Sep 17 00:00:00 2001 From: olpc user Date: Tue, 7 Jan 2020 16:52:56 -0800 Subject: small improvements --- .gitignore | 1 + git-maintenance/get.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1fa433b..869d7b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ git-maintenance/.bsv/tx +git-maintenance/.bsv/objects git-maintenance/bsvup* 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