From: Fabian Groffen Date: Tue, 9 Mar 2010 14:17:51 +0000 (-0000) Subject: don't get confused by carriage returns in windows edited files (such as provided... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a60e13280027bb6e711f5c6d043c37a346b0d8b2;p=portage.git don't get confused by carriage returns in windows edited files (such as provided by ant-core) svn path=/main/branches/prefix/; revision=15801 --- 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