Compare commits

...

3 commits

Author SHA1 Message Date
b3720019b2 Call issourcezap-member before ${gitdir} check
Some checks are pending
sourcezap / shellcheck (push) Waiting to run
2024-08-09 22:51:35 -03:00
ef1295fb35 Silence issourcezap-member noise in sourcezap-sh 2024-08-09 22:48:27 -03:00
230ae9b1e8 Update README 2024-08-07 19:56:45 -03:00
6 changed files with 12 additions and 11 deletions

View file

@ -1,10 +1,10 @@
## About
sourcezap manages a local copy of the
sourcezap is a utility that manages a local copy of the
[HardenedBSD source tree](https://git.HardenedBSD.org/HardenedBSD/HardenedBSD).
The copy of the source tree is maintained by members of
the `_sourcezap` group, and a copy of the source tree
can be installed into `/usr/src/` by root.
the `_sourcezap` group, and the copy of the source tree
can be installed into `/usr/ports/` by root.
## CLI

View file

@ -21,7 +21,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1
fi
if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then
if ! "${libexec}"/utils/issourcezap-member; then
printerr "$(id -un) is not a member of _sourcezap"
exit 1
fi

View file

@ -22,7 +22,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1
fi
if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then
if ! "${libexec}"/utils/issourcezap-member; then
printerr "$(id -un) is not a member of _sourcezap"
exit 1
fi

View file

@ -20,7 +20,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1
fi
if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then
if ! "${libexec}"/utils/issourcezap-member; then
printerr "$(id -un) is not a member of _sourcezap"
exit 1
fi

View file

@ -20,13 +20,14 @@ if [ "$(id -u)" = "0" ]; then
exit 1
fi
if [ ! -e "${gitdir}" ]; then
printerr "try 'sourcezap clone' instead"
if ! "${libexec}"/utils/issourcezap-member; then
printerr "$(id -un) is not a member of _sourcezap"
exit 1
fi
if ! "${libexec}"/utils/issourcezap-member; then
printerr "$(id -un) is not a member of _sourcezap"
if [ ! -e "${gitdir}" ]; then
printerr "try 'sourcezap clone' instead"
exit 1
fi
cd "${gitdir}"

View file

@ -5,5 +5,5 @@ set -e
# main
group="_sourcezap"
mygroups=$(id -Gn | tr ' ' '\n')
echo "${mygroups}" | grep -e "^${group}$"
echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1
exit "${?}"