Turn off file name globbing during expansion of ${find_opts} for bug #148115.
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Sep 2006 01:00:09 +0000 (01:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Sep 2006 01:00:09 +0000 (01:00 -0000)
svn path=/main/trunk/; revision=4476

bin/etc-update

index 09acb71345cbe8e7329b2e40db9e20122856b35b..6fffc0f38bb51232b6d034a44ceba7b1f9447aa3 100755 (executable)
@@ -52,7 +52,8 @@ function scan() {
                fi
 
                ofile=""
-               for file in $(find ${path}/ ${find_opts} ! -name '.*~' ! -name '.*.bak' |
+               # The below set -f turns off file name globbing in the ${find_opts} expansion.
+               for file in $(set -f; find ${path}/ ${find_opts} ! -iname '.*~' ! -iname '.*.bak' |
                           sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
                           sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
                        rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")