On Sat, Oct 1, 2011 at 3:01 AM, lolilolicon <[email protected]> wrote:
> config_parser.sh provides functions to support parsing simple config
> files, pacman.conf for example.  Our scripts should never use a dirty
> eval to get config values such as DBPath.
>
> conf_key_get_val() is modified from pacman-key's get_from() function.
> All the parser functions implemented read config file from stdin, which
> makes chaining a breeze.
>
> Signed-off-by: lolilolicon <[email protected]>
> ---
>  scripts/library/README           |    3 +
>  scripts/library/config_parser.sh |  106 
> ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 109 insertions(+), 0 deletions(-)
>  create mode 100644 scripts/library/config_parser.sh
>

So I insist on reading from stdin. Don't mess with me :)

I've added functions to address Dan's concerns.  They are modelled towards
pacman.conf but they should be general enough to be general.

Upon these simple parser functions, we should build config file specific
ones, named for example pacman_conf_*.

Please don't be too picky on details.  At this stage, the right thing to do
is make sure this is going in the right direction...

Reply via email to