From 75e6ad53b6fd5dc21e7198a0c7a8917e55906882 Mon Sep 17 00:00:00 2001 From: orbea Date: Fri, 17 Nov 2017 18:36:01 -0800 Subject: [PATCH] qb: read without -r will mangle backslashes. --- qb/qb.params.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qb/qb.params.sh b/qb/qb.params.sh index 68048f2be6..82b39ca500 100644 --- a/qb/qb.params.sh +++ b/qb/qb.params.sh @@ -29,7 +29,7 @@ EOF echo "" echo "Custom options:" - while IFS='=#' read VAR VAL COMMENT; do + while IFS='=#' read -r VAR VAL COMMENT; do VAR=$(echo "${VAR##HAVE_}" | tr '[:upper:]' '[:lower:]') case "$VAR" in 'c89_'*) continue;; @@ -56,7 +56,7 @@ opt_exists() # $opt is returned if exists in OPTS } parse_input() # Parse stuff :V -{ OPTS=; while IFS='=' read VAR dummy; do OPTS="$OPTS ${VAR##HAVE_}"; done < 'qb/config.params.sh' +{ OPTS=; while IFS='=' read -r VAR _; do OPTS="$OPTS ${VAR##HAVE_}"; done < 'qb/config.params.sh' #OPTS contains all available options in config.params.sh - used to speedup #things in opt_exists()