File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -1531,7 +1531,14 @@ printHelp() {
15311531 all ${all_linux_arm64_default_packages}
15321532
15331533 EOF
1534- false
1534+
1535+ exit
1536+ }
1537+
1538+ syntaxError () {
1539+ log ERROR " ${1} " || true
1540+ echo >&2
1541+ printHelp
15351542}
15361543
15371544download_only=' false'
@@ -1552,17 +1559,24 @@ do
15521559 require_theirs=' true'
15531560 shift
15541561 ;;
1555- ' --' * )
1556- helpError
1562+ ' -h' |' --help' )
1563+ printHelp
1564+ ;;
1565+ ' -' * )
1566+ syntaxError ' Unknown option'
15571567 ;;
15581568 * )
15591569 break
15601570 esac
15611571done
15621572
15631573# Usage
1564- if [ " ${# } " -lt " 2" ]; then
1565- errorHelp
1574+ if [ " ${# } " -lt " 1" ]
1575+ then
1576+ syntaxError ' Missing platform and package(s)'
1577+ elif [ " ${# } " -lt " 2" ]
1578+ then
1579+ syntaxError ' Missing package(s)'
15661580fi
15671581
15681582# Do not reuse self-built curl from external_deps custom PATH
@@ -1603,7 +1617,7 @@ case "${platform}" in
16031617 done
16041618 if [ -z " ${platform_list} " ]
16051619 then
1606- errorHelp
1620+ syntaxError ' Unknown platform '
16071621 fi
16081622;;
16091623esac
You can’t perform that action at this time.
0 commit comments