File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,18 @@ root="$1"
1010[ -d " $root " ] || mkdir -p " $root "
1111pushd " $root " || exit 1
1212root=" ."
13- [ -d " .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 " ; }
13+
14+ if [ ! -d .git ]; then
15+ mkdir -p .bkg
16+ pushd .bkg || exit 1
17+ gh auth status & > /dev/null && gh repo clone " ${GITHUB_OWNER:- ipitio} /${GITHUB_REPO:- backage} " " ." -- --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" " ."
18+ popd || exit 1
19+ shopt -s dotglob
20+ mv .bkg/* .
21+ rm -rf .bkg
22+ shopt -u dotglob
23+ fi
24+
1425pushd src || exit 1
1526source bkg.sh
1627popd || exit 1
You can’t perform that action at this time.
0 commit comments