From 6b9dac473def1e6ed0daedb9eb35664fbbfffb8c Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 24 Aug 2026 16:51:55 -1000 Subject: Prefer POSIX forms throughout the test scripts --- tests/setup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index 93a663a..aac498c 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -56,7 +56,8 @@ FILTER_DIRECTORY=$(cd ../filters && pwd) # Lua filters only work when cgit was compiled with Lua, so the tests that use # them have to ask the binary rather than assume. -if cgit --version | grep -F -q "[+] Lua scripting"; then +if cgit --version | grep -F -q "[+] Lua scripting" +then export CGIT_HAS_LUA=1 else export CGIT_HAS_LUA=0 @@ -78,7 +79,7 @@ mkrepo() { echo $n >file-$n git add file-$n git commit -m "commit $n" - n=$(expr $n + 1) + n=$((n + 1)) done case "$variant" in testplus) @@ -146,7 +147,8 @@ repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh repo.readme=master:a+b EOF - if [ $CGIT_HAS_LUA -eq 1 ]; then + if test "$CGIT_HAS_LUA" -eq 1 + then cat >>cgitrc <