summaryrefslogtreecommitdiff
path: root/git-maintenance/get.sh
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-07 16:52:56 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-07 16:52:56 -0800
commit22f84a2e843b985deb9fe3f4e378e29059b16645 (patch)
tree5873566f517edaf2f7b80e48393991ec3fc442ba /git-maintenance/get.sh
parent9e14e91780a4cfd496aa09930161525b50edde42 (diff)
downloadstandingwithresilience-22f84a2e843b985deb9fe3f4e378e29059b16645.tar.gz
standingwithresilience-22f84a2e843b985deb9fe3f4e378e29059b16645.zip
small improvements
Diffstat (limited to 'git-maintenance/get.sh')
-rwxr-xr-xgit-maintenance/get.sh8
1 files changed, 6 insertions, 2 deletions
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 ===="