From f73d409d20a3872fba623135c44c0e9573378437 Mon Sep 17 00:00:00 2001
From: 0x1eef <0x1eef@protonmail.com>
Date: Sun, 15 Jan 2023 19:51:18 -0300
Subject: [PATCH] Remove the leftovers of 'portzap rmtree'
---
README.md | 4 ----
bin/portzap | 10 +++-------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index ee3d0c9..454ac5a 100644
--- a/README.md
+++ b/README.md
@@ -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.
The command copies `/tmp/ports` to `/usr/ports`.
-* **portzap rmtree**
- This command can be run as root, or a regular user.
- The command removes `/tmp/ports`.
-
## Sources
* [Source code (GitHub)](https://github.com/0x1eef/portzap)
diff --git a/bin/portzap b/bin/portzap
index 912a85b..c34b287 100755
--- a/bin/portzap
+++ b/bin/portzap
@@ -48,14 +48,14 @@ user_is_not_root() {
# Commands
help() {
- echo "Usage: portzap init|clone|pull|unpack|rmtree"
+ echo "Usage: portzap init|clone|pull|unpack"
}
init() {
if user_is_not_root;
then
echo "The init command should be run as root."
- exit
+ exit 1
fi;
umask $init_mode
pw userdel _portzap -r
@@ -68,7 +68,7 @@ clone() {
if [ -e "$stage_dir/.git" ];
then
echo "$stage_dir has already been cloned."
- echo "Run 'portzap pull', or 'portzap rmtree' instead."
+ echo "Run 'portzap pull' instead."
exit 1
fi
umask $clone_mode
@@ -124,10 +124,6 @@ case $1 in
unpack
break
;;
- "rmtree")
- rmtree
- break
- ;;
*)
help
break