1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
show_help=
prefix=/usr/local
for option do
optarg=`expr "x$option" : 'x[^=]*=\(.*\)'`
case $option in
-h | --help)
show_help=true ;;
--prefix=*)
prefix=$optarg ;;
esac
done
if test -n "$show_help"; then
cat <<EOF
Usage: $0 [OPTION]...
Options:
-h, --help display this help and exit
--prefix=PREFIX install this package under PREFIX
EOF
exit 0
fi
echo Installation prefix: $prefix
cat > Makefile.config <<EOF
ifeq (\$(PREFIX),)
PREFIX := $prefix
endif
EOF
echo
echo Now type \`make\'.
|