From a396a6908110a860a89a1e640153bac1e0da2a57 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 5 May 2017 18:41:09 -0400 Subject: Make slightly more involved changes to make shellcheck happy. - Use `read -r` instead of other forms of read or looping - Use arrays instead of strings with whitespaces. - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1) --- lddd.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lddd.in') diff --git a/lddd.in b/lddd.in index d83c3e6..908923b 100644 --- a/lddd.in +++ b/lddd.in @@ -40,9 +40,9 @@ for tree in $PATH $libdirs $extras; do done grep '^/' "$TEMPDIR/raw.txt" | sed -e 's/://g' >> "$TEMPDIR/affected-files.txt" # invoke pacman -for i in $(cat $TEMPDIR/affected-files.txt); do +while read -r i; do pacman -Qo "$i" | awk '{print $4,$5}' >> "$TEMPDIR/pacman.txt" -done +done < "$TEMPDIR/affected-files.txt" # clean list sort -u "$TEMPDIR/pacman.txt" >> "$TEMPDIR/possible-rebuilds.txt" -- cgit v1.2.3-70-g09d2