diff --git a/build b/build index f3fc7c2..840ec59 100755 --- a/build +++ b/build @@ -462,29 +462,29 @@ cat >"$workdir/$name"/share/zsh/5.8/scripts/relocate <<-\END ;; s) if [ -n "$src" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi src="$OPTARG" ;; d) if [ -n "$dst" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi dst="$OPTARG" ;; - \?) >&2 echo "[error] invalid option: $OPTARG" ; exit 1;; - :) >&2 echo "[error] missing required argument: $OPTARG"; exit 1;; - *) >&2 echo "[internal error] unhandled option: $opt" ; exit 1;; + \?) >&2 echo "[error] invalid option: -$OPTARG" ; exit 1;; + :) >&2 echo "[error] missing required argument: -$OPTARG"; exit 1;; + *) >&2 echo "[internal error] unhandled option: -$opt" ; exit 1;; esac done @@ -704,40 +704,40 @@ while getopts ':m:c:i:h' opt "$@"; do ;; m) if [ -n "$ZSH_BIN_ARCH" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi ZSH_BIN_ARCH="$OPTARG" ;; c) if [ -n "$ZSH_BIN_CPU" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi ZSH_BIN_CPU="$OPTARG" ;; i) if [ -n "$ZSH_BIN_IMAGE" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi ZSH_BIN_IMAGE="$OPTARG" ;; - \?) >&2 echo "[error] invalid option: $OPTARG" ; exit 1;; - :) >&2 echo "[error] missing required argument: $OPTARG"; exit 1;; - *) >&2 echo "[internal error] unhandled option: $opt" ; exit 1;; + \?) >&2 echo "[error] invalid option: -$OPTARG" ; exit 1;; + :) >&2 echo "[error] missing required argument: -$OPTARG"; exit 1;; + *) >&2 echo "[internal error] unhandled option: -$opt" ; exit 1;; esac done diff --git a/install b/install index 8afa348..0fe9c74 100755 --- a/install +++ b/install @@ -97,18 +97,18 @@ while getopts ':hqd:a:f:u:' opt "$@"; do ;; q) if [ -n "$quiet" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi quiet=1 ;; d) if [ -n "$dir" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi dir="$OPTARG" @@ -117,24 +117,24 @@ while getopts ':hqd:a:f:u:' opt "$@"; do case "$OPTARG" in sha256|md5) if [ -n "$algos" -a -z "${algos##*$OPTARG*}" ]; then - >&2 echo "[error] duplicate option: $opt $OPTARG" + >&2 echo "[error] duplicate option: -$opt $OPTARG" exit 1 fi algos="$algos $OPTARG" ;; *) - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 ;; esac ;; f) if [ -n "$file" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi if ! file="$(absfile "$OPTARG")"; then @@ -144,18 +144,18 @@ while getopts ':hqd:a:f:u:' opt "$@"; do ;; u) if [ -n "$url" ]; then - >&2 echo "[error] duplicate option: $opt" + >&2 echo "[error] duplicate option: -$opt" exit 1 fi if [ -z "$OPTARG" ]; then - >&2 echo "[error] incorrect value of $opt: $OPTARG" + >&2 echo "[error] incorrect value of -$opt: $OPTARG" exit 1 fi url="$OPTARG" ;; - \?) >&2 echo "[error] invalid option: $OPTARG" ; exit 1;; - :) >&2 echo "[error] missing required argument: $OPTARG"; exit 1;; - *) >&2 echo "[internal error] unhandled option: $opt" ; exit 1;; + \?) >&2 echo "[error] invalid option: -$OPTARG" ; exit 1;; + :) >&2 echo "[error] missing required argument: -$OPTARG"; exit 1;; + *) >&2 echo "[internal error] unhandled option: -$opt" ; exit 1;; esac done