On 10/19/2018 12:43 AM, PiBa-NL wrote:
Hi Frederic,
Hi Pieter,
Do you have a little time to take a look at (the idea of) the script?
The idea of the script sounds good to me. About the script itself it is
a nice work which could be a good start.
Just a few details below.
Note that "cat $file | grep something" may be shortened by "grep
something $file". It would also be interesting to avoid creating
temporary files as most as possible (at least testflist.lst is not
necessary I think).
TARGET=$(haproxy -vv | grep "TARGET = " | sed 's/.*= //')
OPTIONS=$(haproxy -vv | grep "OPTIONS = " | sed 's/.*= //')
may be shortened by these lines:
{ read TARGET; read OPTIONS; } << EOF
$(./haproxy -vv |grep 'TARGET\|OPTIONS' | sed 's/.* = //')
EOF
which is portable, or something similar.
sed 's/.*=//'| sed 's/,.*//'
may be shortened by
sed -e 's/.*=//' -e 's/,.*//'
Also note, there are some cases where options are enabled without
appearing in OPTIONS variable value.
For instance if you compile haproxy like that:
$ make TARGET=linux2628
the support for the thread is enabled without appearing in OPTIONS
variable value. I am not sure this is an issue at this time.
Perhaps we could could only one line for the required options and
excluded targets like that:
#EXCLUDED_TARGETS=freebsd,dos,windows ;)
#REQUIRED_OPTIONS=OPENSSL,LUA,ZLIB
Thank you a lot.
Thanks in advance :).
Op 3-10-2018 om 21:52 schreef PiBa-NL:
Hi Frederic,
Made a little script (attached)..
What do you think ? Could this work for current 'requirements'?
Regards,
PiBa-NL (Pieter)