[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FTWCA storing config/ in VCS



On Fri, Jan 23, 2009 at 11:07:33AM +0100, Cyril Brulebois wrote:
> Cyril Brulebois <cyril.brulebois@kerlabs.com> (23/01/2009):
> > As Juergen says, escaping in various ways didn't help, but I guess at
> > least the following bit should be reverted (though it doesn't address
> > the problem Juergen initially mentioned):
> > | -Local_arguments ${EXTRA_ARGUMENTS} "${@}"
> > | +Local_arguments "${EXTRA_ARGUMENTS} ${@}"
> 
> That also breaks a basic:
> | lh_config --iso-publisher='Cyril Brulebois <cyril.brulebois@kerlabs.com>'
> 
> Specified options get silently ignored. (And reverting the
> above-mentioned bits helps.)

So we must let the command-line expansion expand it?

This would work for:

  --iso-publisher Cyril Brulebois <cyril.brulebois@kerlabs.com>

But porbably not for the more escaped ones:

diff --git a/helpers/lh_config b/helpers/lh_config
index ef5b506..3a01621 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -715,15 +715,20 @@ fi
 # Reading existing configuration
 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source

+config_cfg_args() {
 if [ -x config.cfg ]
 then
-       EXTRA_ARGUMENTS="$(./config.cfg)"
+       echo "$(./config.cfg)"
 elif [ -r config.cfg ]
 then
-       EXTRA_ARGUMENTS="$(sed -e '/^$/d' -e '/^#/d' config.cfg | sed -e '$!N;s/\n/ /g')"
+       sed -e '/^$/d' -e '/^#/d' config.cfg | \
+               while read name value; do
+                       echo $name "$value"
+               done
 fi
+}

-Local_arguments "${EXTRA_ARGUMENTS} ${@}"
+Local_arguments "`config_cfg_args`" "${@}"

 if [ -n "${_CONFFILE}" ]
 then


-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir


Reply to: