[arch-dev-public] [PATCH] checkpkg: protect expression with single quote
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
On Sun, Feb 20, 2011 at 7:08 PM, Stéphane Gaudreault <stephane@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.
participants (2)
-
Eric Bélanger
-
Stéphane Gaudreault