Skip to content

Commit

Permalink
* autogen.sh: Simplify argument parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgmorris committed Jan 12, 2017
1 parent d40073f commit 3713c7a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,21 @@ check_version ()
}

do_check=true
do_autoconf=false
test $# -eq 0 && do_autoconf=true
do_autoconf=true
do_git=false

for arg; do
case $arg in
--help)
exec echo "$0: usage: $0 [all|autoconf|git]";;
--no-check)
do_check=false
test $# -eq 1 && do_autoconf=true;;
do_check=false;;
all)
do_autoconf=true
test -e .git && do_git=true;;
autoconf)
do_autoconf=true;;
true;;
git)
do_autoconf=false
do_git=true;;
*)
echo >&2 "$0: $arg: unknown argument"; exit 1;;
Expand Down

0 comments on commit 3713c7a

Please sign in to comment.