[arch-dev-public] [PATCH] checkpkg: protect expression with single quote

Stéphane Gaudreault stephane at archlinux.org
Sun Feb 20 19:08:26 EST 2011


I needed to quote the grep expression to avoid error like 

usr/lib/python3.2/encodings/iso2022_jp_1.py: objdump: usr/lib/python3.2/encodings/iso2022_jp_1.py: File format not recognized



--- checkpkg   2011-01-08 11:35:59.000000000 -0500
+++ checkpkg       2011-02-20 19:01:13.853333510 -0500
@@ -88,7 +88,7 @@
                mkdir -p pkg
                cd pkg
                bsdtar xf ../"$pkgfile" > /dev/null
-               for i in `diff ../filelist-$_pkgname-old ../filelist-$_pkgname | grep \> | grep \.so | awk '{print $2}'`; do
+               for i in `diff ../filelist-$_pkgname-old ../filelist-$_pkgname | grep \> | grep '\.so' | awk '{print $2}'`; do
                        echo -n "${i}: "
                        objdump -p $i | grep SONAME
                done


More information about the arch-dev-public mailing list