shtest+configure: remove uses of non-portable/non-standard commands
Replace deprecated test(1) parentheses and -a logical operator with two tests command. Replace deprecated tail -1 with tail -n1. Replace non-standard egrep(1) command with grep -E ; this also prevents obsolescence warnings on GNU systems.
This commit is contained in:
1 parent
507eb8283c
commit
c2db51eeb3
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -244,7 +244,7 @@ if which seq > /dev/null 2>&1; then
|
||||
if [ -n "$VALGRIND" ]; then
|
||||
grep '^==[0-9][0-9]*== ERROR SUMMARY: 0 errors' $d/err > /dev/null
|
||||
else
|
||||
tail -1 $d/err | egrep -i 'assert|abort|core' && false
|
||||
tail -n1 -- "$d/err" | grep -Ei 'assert|abort|core' && false
|
||||
fi
|
||||
|
||||
dd "if=tests/torture/input0.json" bs=$i count=1 2>/dev/null |
|
||||
@@ -252,7 +252,7 @@ if which seq > /dev/null 2>&1; then
|
||||
if [ -n "$VALGRIND" ]; then
|
||||
grep '^==[0-9][0-9]*== ERROR SUMMARY: 0 errors' $d/err > /dev/null
|
||||
else
|
||||
tail -1 $d/err | egrep -i 'assert|abort|core' && false
|
||||
tail -n1 -- "$d/err" | grep -Ei 'assert|abort|core' && false
|
||||
fi
|
||||
|
||||
diff $d/out0 $d/out1
|
||||
|
||||
Reference in new issue
Block a user