Use -r because Solaris' sh doesn't have -e (?!) Avoid extended REs (not necessary here but doesn't hurt)

This commit is contained in:
Paul Gardner-Stephen 2012-09-05 20:26:09 +09:30
parent bba6839656
commit 0891a7429f

View File

@ -1,6 +1,6 @@
#!/bin/sh
if [ ! -e nacl-version ]; then
if [ ! -r nacl-version ]; then
echo "Can't find nacl-version file"
exit 1
fi
@ -72,7 +72,7 @@ for ar in $arlist; do
incpath=`dirname $ar`/../../include/$arch
rm -f test
gcc -o test test.c $ar -I$incpath >/dev/null 2>&1
if [ -e test ]; then
if [ -r test ]; then
naclbuilddir=`echo $ar | sed -e s,/libnacl.a,,`
echo "${incpath}" >naclinc.txt
echo "${ar}" >nacllib.txt
@ -82,5 +82,5 @@ done
rm -f test test.c
# Create nacl.h for lazy programmers
(cd ${incpath} ; find . -name \*.h -a \! -name mphlr.h -a \! -name nacl.h | sed -Ee 's,\./(.*),#include <\1>,') >${incpath}/nacl.h
(cd ${incpath} ; find . -name \*.h -a \! -name mphlr.h -a \! -name nacl.h | sed -e 's,\./\(.*\),#include <\1>,') >${incpath}/nacl.h