Commit 7020d235 authored by Lukas Fleischer's avatar Lukas Fleischer Committed by Pierre Schmitz
Browse files

checkpkg: Use read builtin to get new ".so" files



The read shell builtin is the proper way to read single lines. Also,
simplify grep(1) and awk(1) invocations and use a single awk(1)
expression, that supports extracting file names with spaces, instead.

Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent 7952d6fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ for _pkgname in "${pkgname[@]}"; do
		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
		diff "../filelist-$_pkgname-old" "../filelist-$_pkgname" | awk '/>.*\.so/{$1 = ""; print $0}' | while read i; do
			echo "${i}: " "$(objdump -p "$i" | grep SONAME)"
		done
		cd ..