Add source
Some checks are pending
sourcezap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-07-08 11:04:06 -03:00
parent aaecf00394
commit a610b976ba
3 changed files with 4 additions and 2 deletions

View file

@ -73,6 +73,7 @@ via git:
* [GitHub](https://github.com/0x1eef/sourcezap) * [GitHub](https://github.com/0x1eef/sourcezap)
* [GitLab](https://gitlab.com/0x1eef/sourcezap) * [GitLab](https://gitlab.com/0x1eef/sourcezap)
* [git.HardenedBSD.org](https://git.HardenedBSD.org/0x1eef/sourcezap) * [git.HardenedBSD.org](https://git.HardenedBSD.org/0x1eef/sourcezap)
* [brew.bsd.cafe](https://brew.bsd.cafe/0x1eef/sourcezap)
## License ## License

View file

@ -7,6 +7,7 @@ localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
libexec="${localbase}"/libexec/sourcezap libexec="${localbase}"/libexec/sourcezap
gitdir=$1 gitdir=$1
echo "is $@"
## ##
# functions # functions
git() git()
@ -44,7 +45,7 @@ fi
set -x set -x
cd "${gitdir}" cd "${gitdir}"
branch=$(git "branch --show-current") branch=$(git branch --show-current)
git pull --rebase origin "${branch}" git pull --rebase origin "${branch}"
set +x set +x
printok "pull complete" printok "pull complete"

View file

@ -10,4 +10,4 @@ mode=u=rwX,g=rX,o=
# main # main
doas -n \ doas -n \
-u _sourcezap \ -u _sourcezap \
/bin/sh -c "umask ${mode}; ${git} ${1}" /bin/sh -c "umask ${mode}; exec ${git} ${@}"