From c58aec524d26a80fe2c5706425aceae6c32b6edd Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Wed, 10 May 2023 13:04:48 +1000 Subject: [PATCH] put back USER for local & remote --- config | 5 ++++- git-mirror-repo.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config b/config index 1855245..f5fc567 100644 --- a/config +++ b/config @@ -1,12 +1,15 @@ [smegit] DEBUG=false -WORKDIR=/smegit +# if first character ~ will be relative to users home, otherwise absolute +WORKDIR=~/smegit COMMONREPO=https://src.koozali.org/smedev/common.git # Brian's token, but please use wisely! OPENAI_API_KEY=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 [local] +USER= GITEAHOST= GITEAACCESSTOKEN= [remote] +USER= GITEAHOST=https://src.koozali.org GITEAACCESSTOKEN= diff --git a/git-mirror-repo.sh b/git-mirror-repo.sh index 2193999..dcffa15 100755 --- a/git-mirror-repo.sh +++ b/git-mirror-repo.sh @@ -64,7 +64,7 @@ fi if [ $DEBUG ] ; then echo "checking if $TARGETORG/$1 already exists on $LOCALGITEAHOST" ; fi RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" $LOCALGITEAHOST/$TARGETORG/$1) if [ $DEBUG ] ; then echo "RESPONSE=$RESPONSE" ; fi -if [[ "$RESPONSE" == "200" || "$RESPONSE" == "307" ]] ; then +if [ "$RESPONSE" == "200" ] ; then echo "Repository $TARGETORG/$1 already exists on $LOCALGITEAHOST - cannot migrate" exit 1 fi