aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2021-01-31 14:53:37 +0100
committerMario Trangoni <mjtrangoni@gmail.com>2021-01-31 14:53:37 +0100
commit22b40e690ac85ba694b999ecdfbbd91ab923b64c (patch)
tree1ede9ea950bc3934bd55ffba338c3db2a26d0227
parent2168bc68987c0d47f5898040ead57484d2671fb7 (diff)
downloadnx-libs-22b40e690ac85ba694b999ecdfbbd91ab923b64c.tar.gz
nx-libs-22b40e690ac85ba694b999ecdfbbd91ab923b64c.tar.bz2
nx-libs-22b40e690ac85ba694b999ecdfbbd91ab923b64c.zip
shellcheck: Fix SC2002 issue
See, $ find . -name "*.sh" | xargs shellcheck -i SC2002 For more information: https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file... Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
-rw-r--r--nx-X11/lib/src/util/mkks.sh4
-rwxr-xr-xregenerate-symbol-docs.sh10
-rwxr-xr-xroll-tarballs.sh4
3 files changed, 9 insertions, 9 deletions
diff --git a/nx-X11/lib/src/util/mkks.sh b/nx-X11/lib/src/util/mkks.sh
index ab5ca80c9..1831081f9 100644
--- a/nx-X11/lib/src/util/mkks.sh
+++ b/nx-X11/lib/src/util/mkks.sh
@@ -1,10 +1,10 @@
#!/bin/sh
-cat $* | awk 'BEGIN { \
+awk 'BEGIN { \
printf "/*\n * This file is generated from %s. Do not edit.\n */\n", \
"$(INCLUDESRC)/keysymdef.h";\
} \
/^#define/ { \
len = length($2)-3; \
printf("{ \"%s\", %s },\n", substr($2,4,len), $3); \
-}'
+}' $*
diff --git a/regenerate-symbol-docs.sh b/regenerate-symbol-docs.sh
index 96b23c9d8..05548bdb0 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 -r symbol; do
+grep -v -E "^#" "../../../$SYMBOLS_FILE" | 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 -r symbol; do
+grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | 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 -r symbol; do
+grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | 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 -r symbol; do
+grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | 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 -r symbol; do
+grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
echo "#### $symbol ####"
diff --git a/roll-tarballs.sh b/roll-tarballs.sh
index 5d0b7c215..2e2a19f7a 100755
--- a/roll-tarballs.sh
+++ b/roll-tarballs.sh
@@ -161,7 +161,7 @@ if [ "x$MODE" = "xfull" ]; then
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 -r file
+ sort "debian/patches/series" | 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 -r file
+ sort "debian/patches/series" | 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"