From 4619369659eb3af0b32b100be4c67dfc913d8d0a Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sun, 5 Nov 2023 09:40:25 +1100 Subject: [PATCH] add help to add-user --- koji-setup/koji-add-user.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/koji-setup/koji-add-user.sh b/koji-setup/koji-add-user.sh index e42202a..f4c6998 100644 --- a/koji-setup/koji-add-user.sh +++ b/koji-setup/koji-add-user.sh @@ -4,15 +4,17 @@ set -e DEBUG= SILENT="-s" QUIET="-q" -for param in $1 $2 $3 ; do +for param in "$@" ; do if [ $param ] ; then case $param in debug ) DEBUG="debug" ;; - permission=* ) - NEW_PERMS=${param#*=} ;; - * ) - NEW_USER=$param ;; + permission=* ) + NEW_PERMS=${param#*=} ;; + help | -h | --help ) + echo "koji-add-user.sh [permission= | debug]" ;; + * ) + NEW_USER=$param ;; esac else break