File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1471,7 +1471,7 @@ all_windows_platforms='windows-amd64-mingw windows-amd64-msvc windows-i686-mingw
14711471all_macos_platforms=' macos-amd64-default'
14721472all_platforms=" ${all_linux_platforms} ${all_windows_platforms} ${all_macos_platforms} "
14731473
1474- errorHelp () {
1474+ printHelp () {
14751475 sed -e ' s/\\t/\t/g' << -EOF
14761476 usage: $( basename " ${BASH_SOURCE[0]} " ) [OPTION] <PLATFORM> <PACKAGE(S)...>
14771477
@@ -1530,7 +1530,8 @@ errorHelp() {
15301530 \tall\t${all_linux_arm64_default_packages}
15311531
15321532 EOF
1533- false
1533+
1534+ exit
15341535}
15351536
15361537download_only=' false'
@@ -1551,17 +1552,22 @@ do
15511552 require_theirs=' true'
15521553 shift
15531554 ;;
1554- ' --' * )
1555- helpError
1555+ ' -h' |' --help' )
1556+ printHelp
1557+ ;;
1558+ ' -' * )
1559+ log ERROR ' Unknown option'
15561560 ;;
15571561 * )
15581562 break
15591563 esac
15601564done
15611565
15621566# Usage
1563- if [ " ${# } " -lt " 2" ]; then
1564- errorHelp
1567+ if [ " ${# } " -lt " 1" ]; then
1568+ log ERROR ' Missing platform and package(s)'
1569+ elif [ " ${# } " -lt " 2" ]; then
1570+ log ERROR ' Missing package(s)'
15651571fi
15661572
15671573# Do not reuse self-built curl from external_deps custom PATH
You can’t perform that action at this time.
0 commit comments