Skip to content

Commit

Permalink
Rollup merge of rust-lang#36190 - 0xmohit:pr/issue-31216, r=alexcrichton
Browse files Browse the repository at this point in the history
configure: check if any of the arguments contain --help

Currently it checks only the first argument.

Fixes rust-lang#31216
  • Loading branch information
Jonathan Turner authored Sep 2, 2016
2 parents 49125bd + 7d5fa9e commit 75fb28f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ abs_path() {
(unset CDPATH && cd "$_path" > /dev/null && pwd)
}

HELP=0
for arg; do
case "$arg" in
--help) HELP=1;;
esac
done

msg "looking for configure programs"
need_cmd cmp
need_cmd mkdir
Expand Down Expand Up @@ -566,11 +573,8 @@ esac


OPTIONS=""
HELP=0
if [ "$1" = "--help" ]
if [ "$HELP" -eq 1 ]
then
HELP=1
shift
echo
echo "Usage: $CFG_SELF [options]"
echo
Expand Down

0 comments on commit 75fb28f

Please sign in to comment.