diff options
| author | nl6720 <nl6720@gmail.com> | 2020-10-07 11:29:03 +0300 |
|---|---|---|
| committer | nl6720 <nl6720@gmail.com> | 2020-10-07 11:33:56 +0300 |
| commit | 455e2b94c00f748707f3dac6f0bb9a8c67dee4fe (patch) | |
| tree | 5fb086d2fb93b18126c374720c846cb5328a8f5c | |
| parent | b6241cb1d07fe38128a67ae73e1ee57085085eaf (diff) | |
| download | archiso-455e2b94c00f748707f3dac6f0bb9a8c67dee4fe.tar.gz archiso-455e2b94c00f748707f3dac6f0bb9a8c67dee4fe.tar.bz2 | |
Check command line parameter count instead of option count, and do it after evaluating option arguments
Fixes b6241cb1d07fe38128a67ae73e1ee57085085eaf .
| -rwxr-xr-x | archiso/mkarchiso | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 9e96f5e..2e31e65 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -827,7 +827,9 @@ while getopts 'p:r:C:L:P:A:D:w:o:s:c:g:vh?' arg; do esac done -if (( OPTIND <= 1 )); then +shift $((OPTIND - 1)) + +if (( $# < 1 )); then _msg_error "No command specified" 0 _usage 1 fi @@ -836,7 +838,6 @@ if (( EUID != 0 )); then _msg_error "${app_name} must be run as root." 1 fi -shift $((OPTIND - 1)) command_name="${1}" # Set directory path defaults for legacy commands |
