Skip to content

Commit

Permalink
configure: add --help text
Browse files Browse the repository at this point in the history
  • Loading branch information
rofl0r committed Jul 7, 2012
1 parent 2c9c4d9 commit eb0db72
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

prefix=/usr/local

usage() {
echo "supported arguments"
echo "--prefix=/path default: $prefix"
echo "--exec_prefix=/path default: $prefix/bin"
echo "--bindir=/path default: $prefix/bin"
echo "--libdir=/path default: $prefix/lib"
echo "--includedir=/path default: $prefix/include"
echo "--sysconfdir=/path default: $prefix/etc"
echo "--help : show this text"
exit 1
}

spliteq() {
arg=$1
echo "${arg#*=}"
Expand All @@ -17,6 +29,7 @@ parsearg() {
--libdir=*) libdir=`spliteq $1`;;
--includedir=*) includedir=`spliteq $1`;;
--sysconfdir=*) sysconfdir=`spliteq $1`;;
--help) usage;;
esac
}

Expand Down

0 comments on commit eb0db72

Please sign in to comment.