File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed
Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 6464 fileName : " *.zst"
6565 tarBall : false
6666 zipBall : false
67- out-file-path : " bkg"
67+ out-file-path : " . bkg"
6868
6969 - name : Dry run
7070 id : update
Original file line number Diff line number Diff line change 5656 fileName : " *.zst"
5757 tarBall : false
5858 zipBall : false
59- out-file-path : " bkg"
59+ out-file-path : " . bkg"
6060
6161 - name : Dry run
6262 id : update
Original file line number Diff line number Diff line change 88root=" $1 "
99[[ -n " $root " && ! " ${root: 0: 2} " =~ -(m| d) ]] && shift || root=" ."
1010[ -d " $root " ] || mkdir -p " $root "
11- pushd " $root " || exit 1
12- 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 " ; }
1312
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
13+ # actions: move db into root
14+ shopt -s dotglob
15+ [ ! -d .bkg ] || mv .bkg/* " $root " /
16+ shopt -u dotglob
2417
18+ pushd " $root " || exit 1
2519pushd src || exit 1
2620source bkg.sh
2721popd || exit 1
@@ -54,6 +48,7 @@ BKG_INDEX_DB=$BKG_ROOT/"$BKG_INDEX".db
5448BKG_INDEX_SQL=$BKG_ROOT /" $BKG_INDEX " .sql
5549BKG_INDEX_DIR=$BKG_ROOT /" $BKG_INDEX "
5650set +o allexport
51+ set -x
5752
5853if git ls-remote --exit-code origin " $BKG_INDEX " & > /dev/null; then
5954 git worktree remove -f " $BKG_INDEX " .bak & > /dev/null
You can’t perform that action at this time.
0 commit comments