88root=" $1 "
99[[ -n " $root " && ! " ${root: 0: 2} " =~ -(m| d) ]] && shift || root=" ."
1010[ -d " $root " ] || mkdir -p " $root "
11- [ -d " $root /.git" ] || { gh auth status & > /dev/null && gh repo clone " ${GITHUB_OWNER:- ipitio} /${GITHUB_REPO:- backage} " " $root " -- --depth=1 -b " $GITHUB_BRANCH " --single-branch || git clone --depth=1 -b " $GITHUB_BRANCH " --single-branch " https://$( [ -n " $GITHUB_TOKEN " ] && echo " $GITHUB_TOKEN @ " || echo " " ) github.com/${GITHUB_OWNER:- ipitio} /${GITHUB_REPO:- backage} .git" " $root " ; }
11+ [ -d " $root /.git" ] || { gh auth status & > /dev/null && gh repo clone " ${GITHUB_OWNER:- ipitio} /${GITHUB_REPO:- backage} " " $root " -- --depth=1 -b " $GITHUB_BRANCH " --single-branch || git clone --depth=1 -b " $GITHUB_BRANCH " --single-branch " https://github.com/${GITHUB_OWNER:- ipitio} /${GITHUB_REPO:- backage} .git" " $root " ; }
1212
1313# actions: move db into root
1414shopt -s dotglob
@@ -24,17 +24,16 @@ popd || exit 1
2424[ -n " $GITHUB_TOKEN " ] || GITHUB_TOKEN=$( if git config --get remote.origin.url | grep -q ' @' ; then grep -oP ' (?<=://)[^@]+' ; else echo " " ; fi)
2525[ -n " $GITHUB_TOKEN " ] || ! gh auth status & > /dev/null || GITHUB_TOKEN=$( gh auth token)
2626[ -n " $GITHUB_ACTOR " ] || GITHUB_ACTOR=" ${GITHUB_OWNER:- ipitio} "
27- git config --global user.name " ${GITHUB_ACTOR} "
28- git config --global user.email " ${GITHUB_ACTOR} @users.noreply.github.com"
29- git config --global --get-regexp --name-only ' ^url\.https://.+\.insteadof' | xargs -n1 git config --unset-all 2> /dev/null
30- git config --global url.https://" ${GITHUB_TOKEN} " @github.com/.insteadOf https://github.com/
31- git config --global --add safe.directory " $( pwd) "
32- git config --global core.sharedRepository all
27+ git config user.name " ${GITHUB_ACTOR} "
28+ git config user.email " ${GITHUB_ACTOR} @users.noreply.github.com"
29+ git config credential.helper " !f() { echo username=${GITHUB_ACTOR} ; echo password=${GITHUB_TOKEN} ; }; f"
30+ git config --add safe.directory " $( pwd) "
31+ git config core.sharedRepository all
3332
3433# performance
35- git config --global core.fsmonitor true
36- git config --global core.untrackedcache true
37- git config --global feature.manyFiles true
34+ git config core.fsmonitor true
35+ git config core.untrackedcache true
36+ git config feature.manyFiles true
3837git update-index --index-version 4
3938
4039sudonot chmod -R a+rwX .
0 commit comments