aboutsummaryrefslogtreecommitdiff
path: root/roll-tarballs.sh
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2021-01-31 14:43:47 +0100
committerMario Trangoni <mjtrangoni@gmail.com>2021-01-31 14:43:47 +0100
commit2168bc68987c0d47f5898040ead57484d2671fb7 (patch)
tree612f06ac374ea95c1ac6dc8af4710844ffed0cc0 /roll-tarballs.sh
parent747a337444bbbb61e6956554e33c1387f5f40643 (diff)
downloadnx-libs-2168bc68987c0d47f5898040ead57484d2671fb7.tar.gz
nx-libs-2168bc68987c0d47f5898040ead57484d2671fb7.tar.bz2
nx-libs-2168bc68987c0d47f5898040ead57484d2671fb7.zip
shellcheck: Fix SC2045 issue
See, $ find . -name "*.sh" | xargs shellcheck -i SC2045 In ./roll-tarballs.sh line 220: for f in $(ls README* 2>/dev/null); do ^-----------------------^ SC2045: Iterating over ls output is fragile. Use globs. For more information: https://www.shellcheck.net/wiki/SC2045 -- Iterating over ls output is fragi... Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
Diffstat (limited to 'roll-tarballs.sh')
-rwxr-xr-xroll-tarballs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/roll-tarballs.sh b/roll-tarballs.sh
index 85e098960..5d0b7c215 100755
--- a/roll-tarballs.sh
+++ b/roll-tarballs.sh
@@ -217,8 +217,9 @@ rm -Rf "debian/"
rm -Rf "nx-libs.spec"
# very old release did not add any README
-for f in $(ls README* 2>/dev/null); do
- mv -v "$f" "doc/";
+for f in README*; do
+ [[ -e "$f" ]] || break # handle the case of no README* files
+ mv -v "$f" "doc/"
done
# remove files, that we do not want in the tarballs (build cruft)