Re: FTWCA storing config/ in VCS
I've improved this, the way config.cfg is handled is:
* if config.cfg is executed, its output is taken as extra arguments.
* if config.cfg is not executable, but it's readable, its content
is taken as arguments.
this allows to have dynamic flags depending on whatever you want, e.g.
the following use case:
when i build the image on my machine at home, i want to use my local
mirror for it. when i build the image somewhere else, i'd like to use a
regular debian mirror.
for this, i would create config.cfg the following (certainly stupid to
do it with wget but i'm lazy now and i'm sure you'll get the idea) and
make it executable:
---snip---
#!/bin/sh
if wget -q http://mirror/ftp.debian.org/debian/ -O /dev/null
then
echo "--mirror http://mirror/ftp.debian.org/debian/"
else
echo "--mirror http://ftp.de.debian.org/debian/"
fi
---snap---
Regards,
Daniel
--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: daniel.baumann@panthera-systems.net
Internet: http://people.panthera-systems.net/~daniel-baumann/
Reply to: