Rename "unpack" command to "install"
This commit is contained in:
parent
f08ad32c90
commit
db80298d8f
2 changed files with 11 additions and 11 deletions
|
@ -23,9 +23,9 @@ is maintained as a git repository, and portzap allows the repository to be clone
|
|||
This command should be run by a user account that is a member of the `_portzap` group. <br>
|
||||
The command updates an existing repository previously cloned with `portzap clone`.
|
||||
|
||||
* **portzap unpack** <br>
|
||||
* **portzap install** <br>
|
||||
This command should be run as root. <br>
|
||||
The command copies `/home/_portzap/ports` to `/usr/ports`.
|
||||
The command installs `/home/_portzap/ports` into `/usr/ports`.
|
||||
|
||||
## Sources
|
||||
|
||||
|
|
18
bin/portzap
18
bin/portzap
|
@ -16,7 +16,7 @@ pull_mask=007
|
|||
|
||||
##
|
||||
# Default modes
|
||||
unpack_mode="u=rwX,g=rX,o=rX"
|
||||
install_mode="u=rwX,g=rX,o=rX"
|
||||
|
||||
##
|
||||
# Utils
|
||||
|
@ -52,7 +52,7 @@ user_is_not_root() {
|
|||
##
|
||||
# Commands
|
||||
help() {
|
||||
echo "Usage: portzap init|clone|pull|unpack"
|
||||
echo "Usage: portzap init|clone|pull|install"
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -100,16 +100,16 @@ pull() {
|
|||
fi
|
||||
}
|
||||
|
||||
unpack() {
|
||||
install() {
|
||||
if user_is_not_root;
|
||||
then
|
||||
echo "The unpack command should be run as root."
|
||||
echo "The install command should be run as root."
|
||||
exit 1
|
||||
fi
|
||||
cd $transient_dir
|
||||
find . -maxdepth 1 -type f -exec install -m=$unpack_mode {} $rest_dir \;
|
||||
find . -maxdepth 1 -type d -exec mkdir -p -m $unpack_mode $rest_dir/{} \;
|
||||
find . -depth 2 -type d -exec portzap-install-port {} $rest_dir $unpack_mode \;
|
||||
find . -maxdepth 1 -type f -exec install -m=$install_mode {} $rest_dir \;
|
||||
find . -maxdepth 1 -type d -exec mkdir -p -m $install_mode $rest_dir/{} \;
|
||||
find . -depth 2 -type d -exec portzap-install-port {} $rest_dir $install_mode \;
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
@ -127,8 +127,8 @@ case $1 in
|
|||
pull
|
||||
break
|
||||
;;
|
||||
"unpack")
|
||||
unpack
|
||||
"install")
|
||||
install
|
||||
break
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue