jw-build-functions.sh: Miscellaneous fixes

- Remove include statements from section output
  - Fix reset toplevel section
This commit is contained in:
Jan Lindemann 2011-02-24 12:07:30 +00:00 committed by Jan Lindemann
commit 289afe8d29

View file

@ -51,11 +51,11 @@ _ytools_probe_config_paths()
_ytools_cat_section()
{
if [ "$2" ]; then
sed -n "/\[$2\]/,/[^ ]*\[/ p" $1 | sed '/[^ ]*\[/ d'
sed -n "/\[$2\]/,/[^ ]*\[/ p" $1 | sed '/[^ ]*\[/ d; /^[ ]*include[ ]/ d'
return
fi
sed -n '0,/[^ ]*\[/ p' | sed '/[^ ]*\[/ d; s/=.*/=/' $1
sed -n '0,/[^ ]*\[/ p' | sed '/[^ ]*\[/ d; /^[ ]*include[ ]/ d' $1
}
_ytools_format_config()