diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-17 03:37:50 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-17 03:39:42 (EST) |
commit | fcbc2bf36d668f537012be5ae05f8e452e0acd44 (patch) | |
tree | 737ee38e5fab90a9e1747ce8c13412c6c902bc30 /src/cmd | |
parent | 455a277a2625cf94f7f8d3490b4642242228355d (diff) |
cmd/install: Make suite argument optional
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/install.sh | 15 |
1 files changed, 10 insertions, 5 deletions
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#*:}" |