Skip to content

Commit 07231fe

Browse files
committed
Clean up test-pre.sh bash syntax
shellcheck pointed out a few command substition (backtick vs. $(...)) and quoting issues. This patch fixes them.
1 parent 42ea36e commit 07231fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test-pre.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ test -z "" 2>/dev/null || { echo Error: test command not found ; exit 1 ; }
1717
GREP=`type grep > /dev/null 2>&1 && echo OK`
1818
test "$GREP" = OK || { echo Error: grep command not found ; exit 1 ; }
1919
echo foobar | grep -qE 'asd|oob' 2>/dev/null || { echo Error: grep command does not support -q and/or -E option ; exit 1 ; }
20-
test -e ./test-all.sh || cd $(dirname $0) || exit 1
20+
test -e ./test-all.sh || cd $(dirname "$0") || exit 1
2121
test -e ./test-all.sh || { echo Error: you must be in the test/ directory ; exit 1 ; }
22-
export AFL_PATH=`pwd`/..
22+
export AFL_PATH="$(pwd)/.."
2323
export AFL_TRY_AFFINITY=1 # workaround for travis that fails for no avail cores
2424

2525
echo 1 > test.1
@@ -59,7 +59,7 @@ $ECHO \\101 2>&1 | grep -qE '^A' || {
5959
$ECHO "\\101" 2>&1 | grep -qE '^A' || ECHO=
6060
}
6161
}
62-
test -z "$ECHO" && { printf Error: printf command does not support octal character codes ; exit 1 ; }
62+
test -z "$ECHO" && { echo Error: printf command does not support octal character codes ; exit 1 ; }
6363

6464
export AFL_EXIT_WHEN_DONE=1
6565
export AFL_EXIT_ON_TIME=60
@@ -109,7 +109,7 @@ test -n "$TRAVIS_OS_NAME" && {
109109

110110
# on OpenBSD we need to work with llvm from /usr/local/bin
111111
test -e /usr/local/bin/opt && {
112-
test `uname -s` = 'Darwin' || export PATH="/usr/local/bin:${PATH}"
112+
test "$(uname -s)" = 'Darwin' || export PATH="/usr/local/bin:${PATH}"
113113
}
114114
AFL_COMPILER=afl-clang-fast
115115

@@ -123,7 +123,7 @@ RESET="\\033[0m"
123123
if test -n "$SYS"; then
124124
$ECHO "${RESET}${GREY}[*] Using user supplied environment variable SYS=$SYS"
125125
else
126-
SYS=`uname -m`
126+
SYS=$(uname -m)
127127
fi
128128

129129
MEM_LIMIT=none

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy