Add help command.
This commit is contained in:
parent
ce601530e3
commit
03df6666e1
15
archbox.bash
15
archbox.bash
@ -14,6 +14,16 @@ asroot(){
|
|||||||
[[ $EUID -ne 0 ]] && echo "Run this as root!" && exit 1
|
[[ $EUID -ne 0 ]] && echo "Run this as root!" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
help_text(){
|
||||||
|
cat << EOF
|
||||||
|
USAGE $0 <arguments>
|
||||||
|
OPTIONS:
|
||||||
|
--create LINK Creates a chroot enviroment.
|
||||||
|
--enter Enters chroot enviroment.
|
||||||
|
--help Displays this help message.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
--create)
|
--create)
|
||||||
asroot
|
asroot
|
||||||
@ -39,8 +49,11 @@ case $1 in
|
|||||||
copyresolv
|
copyresolv
|
||||||
$PRIV /usr/local/share/archbox/bin/archboxenter
|
$PRIV /usr/local/share/archbox/bin/archboxenter
|
||||||
;;
|
;;
|
||||||
|
--help)
|
||||||
|
help_text
|
||||||
|
;;
|
||||||
"")
|
"")
|
||||||
echo "Help text"
|
help_text
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
copyresolv
|
copyresolv
|
||||||
|
Loading…
Reference in New Issue
Block a user