diff --git a/copy-firmware.sh b/copy-firmware.sh index 9a2b7156..cd5a6893 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -44,6 +44,7 @@ while test $# -gt 0; do -j*) num_jobs=$(echo "$1" | sed 's/-j//') + num_jobs=${num_jobs:-1} if [ "$num_jobs" -gt 1 ] && ! has_gnu_parallel; then err "the GNU parallel command is required to use -j" fi @@ -76,6 +77,13 @@ while test $# -gt 0; do exit 1 ;; + -*) + # Ignore anything else that begins with - because that confuses + # the "test" command below + warn "ignoring option $1" + shift + ;; + *) if test -n "$destdir"; then err "unknown command-line options: $*"