From 5ea665eb610fa97bc8ff8fa92cad0224123d35a8 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Thu, 29 Oct 2020 22:01:19 +0700 Subject: [PATCH] Add shorter argument. --- archbox.bash | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/archbox.bash b/archbox.bash index dc3bd4e..e664807 100755 --- a/archbox.bash +++ b/archbox.bash @@ -24,9 +24,9 @@ cat << EOF USAGE: $0 OPTIONS: - --create LINK Creates a chroot enviroment. - --enter Enters chroot enviroment. - --help Displays this help message. + -c, --create URL Creates a chroot enviroment. + -e, --enter Enters chroot enviroment. + -h, --help Displays this help message. EOF } @@ -41,7 +41,7 @@ msg(){ } case $1 in - --create) + -c|--create) asroot [[ -z $2 ]] && err "Specify the link of Arch Linux bootstrap tarball!" msg "Creating chroot directory..." @@ -78,18 +78,18 @@ case $1 in cp /usr/local/share/archbox/chroot_setup.bash $CHROOT/chroot_setup chroot $CHROOT /bin/bash -c "sh /chroot_setup" ;; - --enter) + -e|--enter) storeenv copyresolv $PRIV /usr/local/share/archbox/bin/archbox enter ;; - --help) + -h|--help) help_text ;; "") help_text ;; - --*) + -*) err "Unknown option: $1" ;; *)