Description: [[ ... ]] instead of [ ... ] is a basimsm Author: Andreas Metzler Origin: Forwarded: no Last-Update: 2012-02-02 --- findutils-4.5.11.orig/find/testsuite/binary_locations.sh +++ findutils-4.5.11/find/testsuite/binary_locations.sh @@ -1,15 +1,15 @@ # Source this file, don't execute it. -if [[ -z "${testname}" ]]; then +if [ -z "${testname}" ]; then echo 'Please set $testname before sourcing binary_locations.sh.' >&2 exit 1 fi parent="$(cd .. && pwd)" -if [[ -f "${parent}/ftsfind" ]]; then +if [ -f "${parent}/ftsfind" ]; then ftsfind="${parent}/ftsfind" oldfind="${parent}/find" -elif [[ -f "${parent}/oldfind" ]]; then +elif [ -f "${parent}/oldfind" ]; then ftsfind="${parent}/find" oldfind="${parent}/oldfind" else --- findutils-4.5.11.orig/find/testsuite/sv-34079.sh +++ findutils-4.5.11/find/testsuite/sv-34079.sh @@ -41,7 +41,7 @@ make_test_data() { } -if [[ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]]; then +if [ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]; then if outdir=$(mktemp -d); then # Create some test files. bad="" @@ -64,7 +64,7 @@ if [[ -n "${RUN_VERY_EXPENSIVE_TESTS}" ] bad="failed to set up the test in ${outdir}" fi rm -rf "${outdir}" || exit 1 - if [[ -n "${bad}" ]]; then + if [ -n "${bad}" ]; then echo "${bad}" >&2 exit 1 fi --- findutils-4.5.11.orig/find/testsuite/test_escape_c.sh +++ findutils-4.5.11/find/testsuite/test_escape_c.sh @@ -12,7 +12,7 @@ do -printf 'hello^\cthere' \ -exec printf %s {} \; \ -printf '^world\n' )"; then - if [[ "${result}" != "${expected}" ]]; then + if [ "${result}" != "${expected}" ]; then exec >&2 echo "$executable produced incorrect output:" echo "${result}" --- findutils-4.5.11.orig/find/testsuite/sv-bug-32043.sh +++ findutils-4.5.11/find/testsuite/sv-bug-32043.sh @@ -2,10 +2,10 @@ testname="$(basename $0)" parent="$(cd .. && pwd)" -if [[ -f "${parent}/ftsfind" ]]; then +if [ -f "${parent}/ftsfind" ]; then ftsfind="${parent}/ftsfind" oldfind="${parent}/find" -elif [[ -f "${parent}/oldfind" ]]; then +elif [ -f "${parent}/oldfind" ]; then ftsfind="${parent}/find" oldfind="${parent}/oldfind" else @@ -17,7 +17,7 @@ if tstdir=$(mktemp -d); then expected="$tstdir/[" for executable in "$oldfind" "$ftsfind"; do if result=$("$executable" "$tstdir" -name '[' -print); then - if ! [[ "$result" = "$expected" ]]; then + if ! [ "$result" = "$expected" ]; then echo "FAIL: $testname with $executable returned '$result' but '$expected' was expected" >&2 exit 1 fi