Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=9c45492b13552fa399637c242a97170f974614ca

commit 9c45492b13552fa399637c242a97170f974614ca
Author: crazy <[email protected]>
Date:   Sat Oct 8 06:36:30 2016 +0200

check $dir/usr exists before running find on it

diff --git a/scripts/makepkg b/scripts/makepkg
index 781094a..5c29a18 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -1818,12 +1818,14 @@ do
fi
fi
## don't insstall files in /usr/<file>
-       files=$(find ${dir}/usr -maxdepth 1 -type f)
-       if [[ ${files[@]} ]]; then
-               error "Your package seems to install files in /usr/<file>"
-               printf " --> %s\n" ${files[@]}
-               error "Bailing out, please fix your package!"
-               exit 1
+       if [  -d ${dir}/usr ]; then
+               files=$(find ${dir}/usr -maxdepth 1 -type f)
+               if [[ ${files[@]} ]]; then
+                       error "Your package seems to install files in 
/usr/<file>"
+                       printf " --> %s\n" ${files[@]}
+                       error "Bailing out, please fix your package!"
+                       exit 1
+               fi
fi
## don't install files in /
files=$(find ${dir} -maxdepth 1 -type f)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to