]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
portability: Support shells whose test(1) doesn't understand -e
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Nov 2010 15:38:22 +0000 (16:38 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 21 Nov 2010 15:38:22 +0000 (16:38 +0100)
test.sh

diff --git a/test.sh b/test.sh
index 06161458d87fdf8dc3a2626399b697ae09e2bbce..7b719d82ef3ac3afc5609089593da69fe596a23e 100755 (executable)
--- 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