os-builder: define a variable for the config dir?

Martin Langhoff martin.langhoff at gmail.com
Thu Jan 6 10:33:24 EST 2011


Daniel,

there is one aspect of OOB that makes configs rather awkward -- there
is no way (that I can see) to define a "config dir" variable and refer
to it in the .ini file itself, and from modules and scripts.

So whenever we refer to external files, we have to use the full path,
and that's not portable.

For example, I have a custom_script that applies a patch, I have to say

   [custom_scripts]
   custom_script_1=/home/martin/foo/bar/baz/script.sh

 and then in the script itself,

   patch -d $INSTALL_ROOT/etc/doom.conf <
/home/martin/foo/bar/baz/fixup-leibniz.patch

 I would prefer to have a config_dir that for example resolves to
dirname of the oob ini file

   [custom_scripts]
   custom_script_1=%config_dir/script.sh

and then

   patch -d $INSTALL_ROOT/etc/doom.conf < $config_dir/fixup-leibniz.patch

then we can keep the ini and whatever supporting files together, easy
to move to another machine, manage with git, etc.

thoughts?


m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff



More information about the Devel mailing list