Remove the leftovers of 'portzap rmtree'

This commit is contained in:
0x1eef 2023-01-15 19:51:18 -03:00 committed by Robert
parent 54124d2d9f
commit f73d409d20
2 changed files with 3 additions and 11 deletions

View file

@ -24,10 +24,6 @@ is maintained as a git repository, and portzap allows the repository to be clone
This command should be run as root. <br> This command should be run as root. <br>
The command copies `/tmp/ports` to `/usr/ports`. The command copies `/tmp/ports` to `/usr/ports`.
* **portzap rmtree** <br>
This command can be run as root, or a regular user. <br>
The command removes `/tmp/ports`.
## Sources ## Sources
* [Source code (GitHub)](https://github.com/0x1eef/portzap) * [Source code (GitHub)](https://github.com/0x1eef/portzap)

View file

@ -48,14 +48,14 @@ user_is_not_root() {
# Commands # Commands
help() { help() {
echo "Usage: portzap init|clone|pull|unpack|rmtree" echo "Usage: portzap init|clone|pull|unpack"
} }
init() { init() {
if user_is_not_root; if user_is_not_root;
then then
echo "The init command should be run as root." echo "The init command should be run as root."
exit exit 1
fi; fi;
umask $init_mode umask $init_mode
pw userdel _portzap -r pw userdel _portzap -r
@ -68,7 +68,7 @@ clone() {
if [ -e "$stage_dir/.git" ]; if [ -e "$stage_dir/.git" ];
then then
echo "$stage_dir has already been cloned." echo "$stage_dir has already been cloned."
echo "Run 'portzap pull', or 'portzap rmtree' instead." echo "Run 'portzap pull' instead."
exit 1 exit 1
fi fi
umask $clone_mode umask $clone_mode
@ -124,10 +124,6 @@ case $1 in
unpack unpack
break break
;; ;;
"rmtree")
rmtree
break
;;
*) *)
help help
break break