5 PROGS
="java javac jar make sed"
8 while [ "$*" != "" ]; do
9 key
=`echo "$1" | cut -f1 -d=`
10 val
=`echo "$1" | cut -f2 -d=`
14 --help) # This help message
15 echo The following arguments can be used
:
16 cat "$0" |
grep '^\s*--' |
grep '#' |
while read ln; do
17 cmd
=`echo "$ln" | cut -f1 -d')'`
18 msg
=`echo "$ln" | cut -f2 -d'#'`
22 --prefix) #=PATH Change the prefix to the given path
26 echo "Unsupported parameter: '$1'" >&2
35 [ $valid = false
] && exit 1
37 MESS
="A required program cannot be found:"
38 for prog
in $PROGS; do
39 out
="`whereis -b "$prog" 2>/dev/null`"
40 if [ "$out" = "$prog:" ]; then
41 echo "$MESS $prog" >&2
46 [ $valid = false
] && exit 2
48 if [ "`whereis tput`" = "tput:" ]; then
53 ok
='"`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"';
54 ko
='"`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"';
58 echo "MAIN = be/nikiroo/gofetch/Main" > Makefile
59 echo "MORE = " >> Makefile
60 echo "TEST = be/nikiroo/gofetch/test/Test" >> Makefile
61 echo "TEST_PARAMS = $cols $ok $ko" >> Makefile
62 echo "NAME = gofetch" >> Makefile
63 echo "PREFIX = $PREFIX" >> Makefile
64 echo "JAR_FLAGS += -C bin/ org -C bin/ be -C bin/ VERSION" >> Makefile
65 #echo "SJAR_FLAGS += -C src/ org -C src/ jexer -C src/ be -C ./ LICENSE -C ./ README.md -C ./ VERSION" >> Makefile
67 cat Makefile.base
>> Makefile