Skip to content

Commit 7d5fa9e

Browse files
committed
configure: check if any of the arguments contain --help
Currently it checks only the first argument. Fixes rust-lang#31216
1 parent b2799a5 commit 7d5fa9e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

configure

+8-4
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,13 @@ abs_path() {
360360
(unset CDPATH && cd "$_path" > /dev/null && pwd)
361361
}
362362

363+
HELP=0
364+
for arg; do
365+
case "$arg" in
366+
--help) HELP=1;;
367+
esac
368+
done
369+
363370
msg "looking for configure programs"
364371
need_cmd cmp
365372
need_cmd mkdir
@@ -566,11 +573,8 @@ esac
566573

567574

568575
OPTIONS=""
569-
HELP=0
570-
if [ "$1" = "--help" ]
576+
if [ "$HELP" -eq 1 ]
571577
then
572-
HELP=1
573-
shift
574578
echo
575579
echo "Usage: $CFG_SELF [options]"
576580
echo

0 commit comments

Comments
 (0)