From 2168bc68987c0d47f5898040ead57484d2671fb7 Mon Sep 17 00:00:00 2001 From: Mario Trangoni Date: Sun, 31 Jan 2021 14:43:47 +0100 Subject: 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 --- roll-tarballs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roll-tarballs.sh') 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) -- cgit v1.2.3