don't get confused by carriage returns in windows edited files (such as provided...
authorFabian Groffen <grobian@gentoo.org>
Tue, 9 Mar 2010 14:17:51 +0000 (14:17 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 9 Mar 2010 14:17:51 +0000 (14:17 -0000)
svn path=/main/branches/prefix/; revision=15801

bin/misc-functions.sh

index b4b68d3ad9f32fca5b1c1d5990899e2837334001..d4ee2bb4a8b1eba98efe18fb947f60f92ef723ae 100644 (file)
@@ -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