sourcezap erase -> sourcezap rm

This commit is contained in:
0x1eef 2024-05-11 23:55:58 -03:00
parent a6d734f065
commit 32a6d7a369
4 changed files with 11 additions and 11 deletions

View file

@ -35,9 +35,9 @@ the first time:
# This command requires root privileges # This command requires root privileges
# sourcezap install # sourcezap install
# Start over: erase /usr/src/ and /home/_sourcezap/src/ # Remove the contents of /usr/src/ and /home/_sourcezap/src/
# This command requires root privileges # This command requires root privileges
$ sourcezap erase $ sourcezap rm
### ENVIRONMENT ### ENVIRONMENT

View file

@ -50,8 +50,8 @@ case $1 in
require_dependency "git doas" require_dependency "git doas"
"${libexec}"/sourcezap-checkout "${gitdir}" "${2}" "${libexec}"/sourcezap-checkout "${gitdir}" "${2}"
;; ;;
"erase") "rm")
"${libexec}"/sourcezap-erase "${gitdir}" "${installdir}" "${libexec}"/sourcezap-rm "${gitdir}" "${installdir}"
;; ;;
"install") "install")
require_dependency "git doas" require_dependency "git doas"
@ -65,6 +65,6 @@ case $1 in
printf " pull Pull source tree updates\n" printf " pull Pull source tree updates\n"
printf " checkout Checkout a branch other than the default\n" printf " checkout Checkout a branch other than the default\n"
printf " install Install the source tree into /usr/src/\n" printf " install Install the source tree into /usr/src/\n"
printf " erase Erase /usr/src/ and /home/_sourcezap/src/\n" printf " rm Remove /usr/src/ and /home/_sourcezap/src/\n"
;; ;;
esac esac

View file

@ -29,9 +29,9 @@ if [ "$(id -u)" != "0" ]; then
exit 1 exit 1
fi fi
printf "1 Erase %s\n" "${gitdir}" printf "1 Remove the contents of %s\n" "${gitdir}"
printf "2 Erase %s\n" "${installdir}" printf "2 Remove the contents of %s\n" "${installdir}"
printf "3 Erase both (%s and %s)\n" "${gitdir}" "${installdir}" printf "3 Remove the contents of both (%s and %s)\n" "${gitdir}" "${installdir}"
printf "4 Do nothing\n" printf "4 Do nothing\n"
printf "1-4: " printf "1-4: "
while true; do while true; do

View file

@ -14,7 +14,7 @@ sourcezap checkout
.br .br
sourcezap install sourcezap install
.br .br
sourcezap erase sourcezap rm
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm sourcezap .Nm sourcezap
manages a copy of the HardenedBSD source tree. manages a copy of the HardenedBSD source tree.
@ -48,9 +48,9 @@ Install /home/_sourcezap/src/ into /usr/src/.
.br .br
This command requires root privileges. This command requires root privileges.
.Pp .Pp
.Nm sourcezap erase .Nm sourcezap rm
.br .br
Start over: erase /usr/src/ and /home/_sourcezap/src/. Remove the contents of /usr/src/ and /home/_sourcezap/src/.
.br .br
This command requires root privileges. This command requires root privileges.
.br .br