Use find -path -or -name to match basenames of files in INSTALL_MASK
authorZac Medico <zmedico@gentoo.org>
Mon, 5 May 2008 21:50:08 +0000 (21:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 5 May 2008 21:50:08 +0000 (21:50 -0000)
as suggested by solar in bug #219286, comment #8.

svn path=/main/trunk/; revision=10212

bin/misc-functions.sh

index 1d7af4043cfa70667f80c18d90fa0e87fdf4bdba..59fa51e7078644ab619f5b6b104bd064ec741137 100755 (executable)
@@ -413,7 +413,8 @@ install_mask() {
                rm -Rf "${root}"/${no_inst} >&/dev/null
 
                # we also need to handle globs (*.a, *.h, etc)
-               find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null
+               find "${root}" \( -path "${no_inst}" -or -name "${no_inst}" \) \
+                       -exec rm -fR {} \; >/dev/null
        done
        # set everything back the way we found it
        set +o noglob