aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-07 15:06:58 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-07 15:06:58 +0200
commit1fc5c689ed63b2c053ed223453d22c5559c706d6 (patch)
treec0889225d7462abe7f3168f3b268081366d9c2e3
parentf4d654e6b5e993c15a3545c8d4e8d8ef3bb12b2b (diff)
parent6bada8f63d98128b269fb379194aead1eacbd711 (diff)
downloadnx-libs-1fc5c689ed63b2c053ed223453d22c5559c706d6.tar.gz
nx-libs-1fc5c689ed63b2c053ed223453d22c5559c706d6.tar.bz2
nx-libs-1fc5c689ed63b2c053ed223453d22c5559c706d6.zip
Merge branch 'mjtrangoni-fix-shellcheck-issues' into 3.6.x
Attributes GH PR #1001: https://github.com/ArcticaProject/nx-libs/pull/1001
-rwxr-xr-xnx-X11/x-indent.sh2
-rwxr-xr-xregenerate-symbol-docs.sh20
-rwxr-xr-xroll-tarballs.sh4
3 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/x-indent.sh b/nx-X11/x-indent.sh
index 327aa6a4f..4690372e6 100755
--- a/nx-X11/x-indent.sh
+++ b/nx-X11/x-indent.sh
@@ -2,7 +2,7 @@
# We want GNU indent, so first search for gindent to avoid /usr/bin/indent
# on the BSDs, which won't work for us
-INDENT=$(which gnuindent || which gindent || which indent)
+INDENT=$(command -v gnuindent || command -v gindent || command -v indent)
if [ -z "${INDENT}" ] ; then
echo "Could not find indent, sorry..." >&2
diff --git a/regenerate-symbol-docs.sh b/regenerate-symbol-docs.sh
index 05548bdb0..90bc9da34 100755
--- a/regenerate-symbol-docs.sh
+++ b/regenerate-symbol-docs.sh
@@ -23,7 +23,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/
+cd nx-X11/lib/X11/ || exit
grep -v -E "^#" "../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
@@ -31,11 +31,11 @@ grep -v -E "^#" "../../../$SYMBOLS_FILE" | while read -r symbol; do
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../$DOC_FILE"
-cd - 1>/dev/null
+cd - 1>/dev/null || exit
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/
+cd nx-X11/programs/Xserver/hw/nxagent/ || exit
grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
@@ -43,11 +43,11 @@ grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../$DOC_FILE"
-cd - 1>/dev/null
+cd - 1>/dev/null || exit
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/
+cd nx-X11/programs/Xserver/hw/nxagent/compext/ || exit
grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
@@ -55,7 +55,7 @@ grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../../$DOC_FILE"
-cd - 1>/dev/null
+cd - 1>/dev/null || exit
# nxcompext
@@ -64,7 +64,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/
+cd nx-X11/programs/Xserver/hw/nxagent/compext/ || exit
grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
@@ -72,11 +72,11 @@ grep -v -E "^#" "../../../../../../$SYMBOLS_FILE" | while read -r symbol; do
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../../$DOC_FILE"
-cd - 1>/dev/null
+cd - 1>/dev/null || exit
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/
+cd nx-X11/programs/Xserver/hw/nxagent/ || exit
grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
echo
@@ -84,4 +84,4 @@ grep -v -E "^#" "../../../../../$SYMBOLS_FILE" | while read -r symbol; do
grep -n "$symbol" *.{c,h} 2>/dev/null
done > "../../../../../$DOC_FILE"
-cd - 1>/dev/null
+cd - 1>/dev/null || exit
diff --git a/roll-tarballs.sh b/roll-tarballs.sh
index c9af13102..a263c7218 100755
--- a/roll-tarballs.sh
+++ b/roll-tarballs.sh
@@ -68,7 +68,7 @@ TARGETDIR="../.."
MANIFEST="$(mktemp)"
TEMP_DIR="$(mktemp -d)"
-trap "rm -f \"${MANIFEST}\"; rm -rf \"${TEMP_DIR}\"" 0
+trap 'rm -f "${MANIFEST}"; rm -rf "${TEMP_DIR}"' 0
# create local copy of Git project at temp location
git archive --format=tar "${CHECKOUT}" --prefix="${PROJECT}-${RELEASE}/" | ( cd "$TEMP_DIR"; tar xf - )
@@ -117,7 +117,7 @@ if [ "x$MODE" = "xfull" ]; then
# nx-X11/extras/Mesa. Deal with the Mesa.patches symlink/folder accordingly
cp -Lr "nx-X11/extras/Mesa" "nx-X11/extras/tmpMesa"
cp -Lr "nx-X11/extras/Mesa.patches" "nx-X11/extras/tmpMesa.patches"
- ls -d nx-X11/extras/* | grep -v "nx-X11/extras/tmpMesa*" | xargs rm -r
+ ls -d nx-X11/extras/* | grep -v "^nx-X11/extras/tmpMesa*" | xargs rm -r
mv "nx-X11/extras/tmpMesa" "nx-X11/extras/Mesa"
mv "nx-X11/extras/tmpMesa.patches" "nx-X11/extras/Mesa.patches"