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