summaryrefslogtreecommitdiff
path: root/git-maintenance/get.sh
diff options
context:
space:
mode:
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 ===="