[X2Go-Commits] [nx-libs] 221/429: shellcheck: Fix SC2162 issue

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:36 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit daeb82e33bfeb23d09f7782728f088bdc5d39ce5
Author: Mario Trangoni <mjtrangoni at gmail.com>
Date:   Sun Jan 31 14:23:06 2021 +0100

    shellcheck: Fix SC2162 issue
    
    See,
    
    find . -name "*.sh" | xargs shellcheck -i SC2162
    
    [...]
    
    For more information:
      https://www.shellcheck.net/wiki/SC2162 -- read without -r will mangle backs...
    
    Signed-off-by: Mario Trangoni <mjtrangoni at gmail.com>
---
 regenerate-symbol-docs.sh | 10 +++++-----
 roll-tarballs.sh          | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/regenerate-symbol-docs.sh b/regenerate-symbol-docs.sh
index 20322247f..289effb25 100755
--- a/regenerate-symbol-docs.sh
+++ b/regenerate-symbol-docs.sh
@@ -24,7 +24,7 @@ SYMBOLS_FILE="doc/libNX_X11/symbols/libNX_X11::symbols.txt"
 DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_internally.txt"
 echo "Scanning for libNX_X11 symbols: in libNX_X11 internally: $DOC_FILE"
 cd nx-X11/lib/X11/
-cat "../../../$SYMBOLS_FILE"  | grep -v -E "^#" | while read symbol; do
+cat "../../../$SYMBOLS_FILE"  | grep -v -E "^#" | while read -r symbol; do
 
 	echo
 	echo "#### $symbol ####"
@@ -36,7 +36,7 @@ cd - 1>/dev/null
 DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_nxagent.txt"
 echo "Scanning for libNX_X11 symbols: in hw/nxagent: $DOC_FILE"
 cd nx-X11/programs/Xserver/hw/nxagent/
-cat "../../../../../$SYMBOLS_FILE"  | grep -v -E "^#" | while read symbol; do
+cat "../../../../../$SYMBOLS_FILE"  | grep -v -E "^#" | while read -r symbol; do
 
 	echo
 	echo "#### $symbol ####"
@@ -48,7 +48,7 @@ cd - 1>/dev/null
 DOC_FILE="doc/libNX_X11/symbols/libNX_X11::symbol-usage_nxcompext.txt"
 echo "Scanning for libNX_X11 symbols: in hw/nxagent/compext: $DOC_FILE"
 cd nx-X11/programs/Xserver/hw/nxagent/compext/
-cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
+cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read -r symbol; do
 
 	echo
 	echo "#### $symbol ####"
@@ -65,7 +65,7 @@ SYMBOLS_FILE="doc/nxcompext/symbols/nxcompext::symbols.txt"
 DOC_FILE="doc/nxcompext/symbols/nxcompext::symbol-usage_internally.txt"
 echo "Scanning for nxcompext symbols: in hw/nxagent/compext internally: $DOC_FILE"
 cd nx-X11/programs/Xserver/hw/nxagent/compext/
-cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read symbol; do
+cat "../../../../../../$SYMBOLS_FILE" | grep -v -E "^#" | while read -r symbol; do
 
 	echo
 	echo "#### $symbol ####"
@@ -77,7 +77,7 @@ cd - 1>/dev/null
 DOC_FILE="doc/nxcompext/symbols/nxcompext::symbol-usage_nxagent.txt"
 echo "Scanning for nxcompext symbols: in hw/nxagent: $DOC_FILE"
 cd nx-X11/programs/Xserver/hw/nxagent/
-cat ../../../../../$SYMBOLS_FILE  | grep -v -E "^#" | while read symbol; do
+cat ../../../../../$SYMBOLS_FILE  | grep -v -E "^#" | while read -r symbol; do
 
 	echo
 	echo "#### $symbol ####"
diff --git a/roll-tarballs.sh b/roll-tarballs.sh
index acef42daa..85e098960 100755
--- a/roll-tarballs.sh
+++ b/roll-tarballs.sh
@@ -81,7 +81,7 @@ cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/"
 
 # Replace symlinks by copies of the linked target files
 # Note: We don't have symlinked directories!!!
-find . -type "l" | while read link; do
+find . -type "l" | while read -r link; do
 	TARGET="$(readlink "${link}")"
 	pushd "$(dirname "${link}")" >/dev/null
 	if [ -f "${TARGET}" ]; then
@@ -156,12 +156,12 @@ if [ "x$MODE" = "xfull" ]; then
     rm -f  "nx-X11/extras/Mesa/src/mesa/main/"*.py
     rm -f  "nx-X11/extras/Mesa/src/mesa/main/"{mesa.def,Imakefile,vsnprintf.c}
 
-    find nx-X11/extras/Mesa/ -name Makefile | while read file; do rm "$file"; done
-    find nx-X11/extras/Mesa/ -name Makefile.* | while read file; do rm "$file"; done
-    find nx-X11/extras/Mesa/ -name descrip.mms | while read file; do rm "$file"; done
+    find nx-X11/extras/Mesa/ -name Makefile | while read -r file; do rm "$file"; done
+    find nx-X11/extras/Mesa/ -name Makefile.* | while read -r file; do rm "$file"; done
+    find nx-X11/extras/Mesa/ -name descrip.mms | while read -r file; do rm "$file"; done
 
     # this is for 3.5.0.x only...
-    cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.(full|full\+lite)\.patch)" | while read file
+    cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.(full|full\+lite)\.patch)" | while read -r file
     do
         cp -v "debian/patches/$file" "doc/applied-patches/"
         echo "${file##*/}" >> "doc/applied-patches/series"
@@ -198,7 +198,7 @@ else
     mv LICENSE.nxcomp LICENSE
 
     # this is for 3.5.0.x only...
-    cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read file
+    cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+(_|-).*\.full\+lite\.patch)" | while read -r file
     do
         cp -v "debian/patches/$file" "doc/applied-patches/"
         echo "${file##*/}" >> "doc/applied-patches/series"

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list