From a60e13280027bb6e711f5c6d043c37a346b0d8b2 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 9 Mar 2010 14:17:51 +0000 Subject: [PATCH] don't get confused by carriage returns in windows edited files (such as provided by ant-core) svn path=/main/branches/prefix/; revision=15801 --- bin/misc-functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index b4b68d3ad..d4ee2bb4a 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -623,7 +623,10 @@ install_qa_check_prefix() { local line=${f##*:} # shebang always appears on the first line ;) [[ ${pos} != 1 ]] && continue + local oldIFS=${IFS} + IFS=$'\r'$'\n'$'\t'" " line=( ${line#"#!"} ) + IFS=${oldIFS} [[ ${WHITELIST} == *" ${line[0]} "* ]] && continue # does the shebang start with ${EPREFIX}? [[ ${line[0]} == ${EPREFIX}* ]] && continue -- 2.26.2