summaryrefslogtreecommitdiff
path: root/lddd.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-03-28 19:14:54 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2017-05-05 18:24:19 -0400
commit0beccef4ac405fdefdafba5b9ac6e7962b1610d2 (patch)
tree38f0e022fac539a9a525f70dcc52f2e920059519 /lddd.in
parentbab91f854240b950f8ab9142e949391406e6a43e (diff)
downloaddevtools32-0beccef4ac405fdefdafba5b9ac6e7962b1610d2.tar.xz
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)
Diffstat (limited to 'lddd.in')
-rw-r--r--lddd.in4
1 files changed, 2 insertions, 2 deletions
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"