From a73a63621ed2c455a5bbd72e93ecd0859f8d7150 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 29 Sep 2013 13:22:22 +0000 Subject: Total screws up display for many file systems. Don't make it the default --- test/conftest | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) (limited to 'test') diff --git a/test/conftest b/test/conftest index e202e87..5b5a45c 100755 --- a/test/conftest +++ b/test/conftest @@ -3,35 +3,33 @@ CONFIG_DIR=./configs CONFIGS=`/usr/bin/find ${CONFIG_DIR} -type f -exec /usr/bin/grep -v -e ^\# -e ^$ {} \; -exec /bin/echo [] \; 2> /dev/null` -parse_lines() { - unset in_sect - while read line; do - case ${line## } in - \[*\]) v="${line#*[}"; v="${v%%]*}" - case $select in - ${v}) echo Starting our section "${select}" >&2 - in_sect=true - ;; - *) [ "${in_sect}" ] && echo Ending our section "${select}" >&2 - echo Start other section "${v}" >&2 - unset in_sect - ;; - esac - ;; - env.*) echo "### ${line} ### ${in_sect} ###" >&2 - [ "${in_sect}" ] || continue - echo Setting environment: ${line#*env.} >&2 - _pref=${line#*env.}; _suf=${_pref#* } - printf "%s " ${_pref%% *}=\'${_suf}\' - ;; - *) echo Ignoring ${line} >&2 - ;; - esac - done -} - select=blubber -_env=$( printf "%s\n" "${CONFIGS}" | parse_lines ) + +unset in_sect +while read line; do + case ${line## } in + \[*\]) case [$select in + ${line%%]*}) echo Starting our section "${select}" >&2 + in_sect=true + ;; + *) [ "${in_sect}" ] && echo Ending our section "${select}" >&2 + echo Start other section "${line%%]*}" >&2 + unset in_sect + ;; + esac + ;; + env.*) echo "### ${line} ### ${in_sect} ###" >&2 + [ "${in_sect}" ] || continue + echo Setting environment: ${line#*env.} >&2 + _pref=${line#*env.}; _suf=${_pref#* } + _env="${_env} ${_pref%% *}='${_suf}'" + ;; + *) echo Ignoring ${line} >&2 + ;; + esac +done <