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

Eric Bélanger snowmaniscool at gmail.com
Sun Feb 20 19:29:22 EST 2011


On Sun, Feb 20, 2011 at 7:08 PM, Stéphane Gaudreault
<stephane at archlinux.org> wrote:
> 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
>

We probably want to replace the backticks by $() at the same time.


More information about the arch-dev-public mailing list