X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=configure.sh;h=4177ea9a1611929e9fd2cbb31537978ce664087b;hp=42f8123945f905182436717804cbf83b26f417ef;hb=36e2f4c4d68606c04692f60876fbdd2368ea01a5;hpb=7d04a702b88445f1b1cb7633879348a5dcdffbfa diff --git a/configure.sh b/configure.sh index 42f8123..4177ea9 100755 --- a/configure.sh +++ b/configure.sh @@ -4,16 +4,30 @@ PREFIX=/usr/local PROGS="java javac jar make sed" +IMG=be/nikiroo/utils/ui/ImageUtilsAwt + valid=true while [ "$*" != "" ]; do - key=`echo "$1" | cut -c1-9` - val=`echo "$1" | cut -c10-` + key=`echo "$1" | cut -f1 -d=` + val=`echo "$1" | cut -f2 -d=` case "$key" in - --prefix=) + --) + ;; + --help) # This help message + echo The following arguments can be used: + cat "$0" | grep '^\s*--' | grep '#' | while read ln; do + cmd=`echo "$ln" | cut -f1 -d')'` + msg=`echo "$ln" | cut -f2 -d'#'` + echo " $cmd$msg" + done + ;; + --prefix) #=PATH Change the prefix to the given path PREFIX="$val" ;; *) echo "Unsupported parameter: '$1'" >&2 + echo >&2 + sh "$0" --help >&2 valid=false ;; esac @@ -38,18 +52,21 @@ if [ "`whereis tput`" = "tput:" ]; then ko='"[ !! ]"'; cols=80; else - ok='"`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"'; - ko='"`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"'; + #ok='"`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"'; + #ko='"`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"'; + ok='"`tput bold`[`tput setaf 2` OK `tput init``tput bold`]`tput init`"'; + ko='"`tput bold`[`tput setaf 1` !! `tput init``tput bold`]`tput init`"'; cols='"`tput cols`"'; fi; echo "MAIN = be/nikiroo/fanfix/Main" > Makefile +echo "MORE = $IMG" >> Makefile echo "TEST = be/nikiroo/fanfix/test/Test" >> Makefile echo "TEST_PARAMS = $cols $ok $ko" >> Makefile echo "NAME = fanfix" >> Makefile echo "PREFIX = $PREFIX" >> Makefile -echo "JAR_FLAGS += -C bin/ org -C bin/ jexer -C bin/ be -C bin/ VERSION" >> Makefile -#echo "SJAR_FLAGS += -C src/ org -C src/ jexer -C src/ be -C ./ LICENSE -C ./ README.md -C ./ VERSION" >> Makefile +echo "JAR_FLAGS += -C ./ src/ -C bin/ org -C bin/ be -C ./ LICENSE -C ./ VERSION -C libs/ licenses" >> Makefile +echo "SJAR_FLAGS += -C src/ org -C src/ be" >> Makefile cat Makefile.base >> Makefile