]> git.cameronkatri.com Git - mandoc.git/commitdiff
The sh(1) "test" builtin on Solaris 10 doesn't have -e,
authorIngo Schwarze <schwarze@openbsd.org>
Sat, 7 Nov 2015 21:31:22 +0000 (21:31 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sat, 7 Nov 2015 21:31:22 +0000 (21:31 +0000)
even though that's required by POSIX.
Use -w and -r, that's just as good.

configure

index afc916f5b786599c73f04060e1e91ee462461f23..261d50bb6454af21e2357f2cea44d3dad0365a5c 100755 (executable)
--- a/configure
+++ b/configure
@@ -16,8 +16,8 @@
 
 set -e
 
-[ -e config.log ] && mv config.log config.log.old
-[ -e config.h   ] && mv config.h config.h.old
+[ -w config.log ] && mv config.log config.log.old
+[ -w config.h   ] && mv config.h config.h.old
 
 # Output file descriptor usage:
 # 1 (stdout): config.h, Makefile.local
@@ -102,7 +102,7 @@ INSTALL_DATA=
 
 # --- manual settings from configure.local -----------------------------
 
-if [ -e ./configure.local ]; then
+if [ -r ./configure.local ]; then
        echo "configure.local: reading..." 1>&2
        echo "configure.local: reading..." 1>&3
        cat ./configure.local 1>&3