From 03df6666e123fead15e36d58adfa876aba079b8f Mon Sep 17 00:00:00 2001 From: lemniskett Date: Tue, 27 Oct 2020 14:30:02 +0700 Subject: [PATCH] Add help command. --- archbox.bash | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/archbox.bash b/archbox.bash index fd98532..e61de70 100755 --- a/archbox.bash +++ b/archbox.bash @@ -14,6 +14,16 @@ asroot(){ [[ $EUID -ne 0 ]] && echo "Run this as root!" && exit 1 } +help_text(){ +cat << EOF +USAGE $0 +OPTIONS: + --create LINK Creates a chroot enviroment. + --enter Enters chroot enviroment. + --help Displays this help message. +EOF +} + case $1 in --create) asroot @@ -39,8 +49,11 @@ case $1 in copyresolv $PRIV /usr/local/share/archbox/bin/archboxenter ;; + --help) + help_text + ;; "") - echo "Help text" + help_text ;; *) copyresolv