From d7c98d4e45f614495399636bf02bc718e4a90ab8 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Mon, 28 Jun 2010 13:31:59 +0200 Subject: makepkg: Only check regular files in $srcdir check The 'grep -R' in the $srcdir check would not only grep regular files, but also devices, symlinks (that might potentially point outside of $pkgdir), pipes and so on. Use find to ensure only regular files are examined. This should fix https://bugs.archlinux.org/task/19975 Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2699f637..c4c9866c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -980,7 +980,7 @@ check_package() { done # check for references to the build directory - if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then + if find "${pkgdir}" -type f -exec grep -q "${srcdir}" {} +; then warning "$(gettext "Package contains reference to %s")" "\$srcdir" fi } -- cgit v1.2.3-24-g4f1b