From fcbc2bf36d668f537012be5ae05f8e452e0acd44 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Jan 2021 03:37:50 -0500 Subject: cmd/install: Make suite argument optional --- (limited to 'src/cmd') diff --git a/src/cmd/install.sh b/src/cmd/install.sh index 0e4a8b9..ecdfe8c 100644 --- a/src/cmd/install.sh +++ b/src/cmd/install.sh @@ -33,15 +33,20 @@ cmd_install_main() fi shift $((${OPTIND} - 1)) - if [ ${#} -lt 2 ]; then + if [ ${#} -eq 1 ]; then + suite='' + root="${1}" + shift 1 + fi + if [ ${#} -eq 2 ]; then + suite="${1}" + root="${2}" + shift 2 + else print_cmd_usage 'install' >&2 return 1 fi - suite="${1}" - root="${2}" - shift 2 - if [ "x${suite%%:*}" != "x${suite}" ]; then profile="${suite%%:*}" suite="${suite#*:}" -- cgit v0.9.1