From: Joel Rosdahl Date: Sun, 21 Nov 2010 15:38:22 +0000 (+0100) Subject: portability: Support shells whose test(1) doesn't understand -e X-Git-Tag: v3.2~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48fcff75f439acf333d330b0ba349e48fe8a7a5c;p=thirdparty%2Fccache.git portability: Support shells whose test(1) doesn't understand -e --- diff --git a/test.sh b/test.sh index 06161458d..7b719d82e 100755 --- a/test.sh +++ b/test.sh @@ -1165,7 +1165,7 @@ EOF int foo; EOF for x in stdout tty sda hda; do - if [ -e /dev/$x ]; then + if [ -b /dev/$x ] || [ -c /dev/$x ]; then echo "#line 1 \"/dev/$x\"" >> strange.c fi done