diff options
author | rillig <rillig@pkgsrc.org> | 2018-11-11 19:31:54 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2018-11-11 19:31:54 +0000 |
commit | 8ad5fd67a7843e520ad4a036e81b15a9d2302ca4 (patch) | |
tree | 23d1b9830188ab6bbb4f291411a88eeb8487d4c4 /bootstrap/bootstrap | |
parent | bb04e56ed27d3956406c48dcbaf151cbc0578ef5 (diff) | |
download | pkgsrc-8ad5fd67a7843e520ad4a036e81b15a9d2302ca4.tar.gz |
bootstrap/bootstrap: detect unknown options and print usage
Running bootstrap with short options (like -q for --quiet) is not
implemented. Therefore, instead of silently ignoring such options, fail
with an appropriate error message.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index ae74230e2f6..73e7ef6ff2b 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.258 2018/11/09 13:37:09 jperkin Exp $ +# $NetBSD: bootstrap,v 1.259 2018/11/11 19:31:54 rillig Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -463,7 +463,8 @@ while [ $# -gt 0 ]; do --quiet) quiet=yes ;; --help) echo "$usage"; exit ;; -h) echo "$usage"; exit ;; - --*) echo "$usage"; exit 1 ;; + -*) echo "${0##*/}: unknown option \"$1\"" 1>&2 + echo "$usage" 1>&2; exit 1 ;; esac shift done |