Compare commits
3 commits
1aa19782c1
...
b3720019b2
Author | SHA1 | Date | |
---|---|---|---|
b3720019b2 | |||
ef1295fb35 | |||
230ae9b1e8 |
6 changed files with 12 additions and 11 deletions
|
@ -1,10 +1,10 @@
|
||||||
## About
|
## 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).
|
[HardenedBSD source tree](https://git.HardenedBSD.org/HardenedBSD/HardenedBSD).
|
||||||
The copy of the source tree is maintained by members of
|
The copy of the source tree is maintained by members of
|
||||||
the `_sourcezap` group, and a copy of the source tree
|
the `_sourcezap` group, and the copy of the source tree
|
||||||
can be installed into `/usr/src/` by root.
|
can be installed into `/usr/ports/` by root.
|
||||||
|
|
||||||
## CLI
|
## CLI
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ if [ "$(id -u)" = "0" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
printerr "$(id -un) is not a member of _sourcezap"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -22,7 +22,7 @@ if [ "$(id -u)" = "0" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
printerr "$(id -un) is not a member of _sourcezap"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -20,7 +20,7 @@ if [ "$(id -u)" = "0" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
printerr "$(id -un) is not a member of _sourcezap"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -20,15 +20,16 @@ if [ "$(id -u)" = "0" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! "${libexec}"/utils/issourcezap-member; then
|
||||||
|
printerr "$(id -un) is not a member of _sourcezap"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e "${gitdir}" ]; then
|
if [ ! -e "${gitdir}" ]; then
|
||||||
printerr "try 'sourcezap clone' instead"
|
printerr "try 'sourcezap clone' instead"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! "${libexec}"/utils/issourcezap-member; then
|
|
||||||
printerr "$(id -un) is not a member of _sourcezap"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
doas -n \
|
doas -n \
|
||||||
-u "${user}" \
|
-u "${user}" \
|
||||||
|
|
|
@ -5,5 +5,5 @@ set -e
|
||||||
# main
|
# main
|
||||||
group="_sourcezap"
|
group="_sourcezap"
|
||||||
mygroups=$(id -Gn | tr ' ' '\n')
|
mygroups=$(id -Gn | tr ' ' '\n')
|
||||||
echo "${mygroups}" | grep -e "^${group}$"
|
echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1
|
||||||
exit "${?}"
|
exit "${?}"
|
||||||
|
|
Loading…
Reference in a new issue