In article <[EMAIL PROTECTED]> you wrote:
>
> +for i in `echo $PATH | tr ':' ' '`
> +do
> + if [ "$PERL" = "" -a -s $i/perl5 ] ; then
> + PERL=$i/perl5
> + fi
> +done
> +
> +for i in `echo $PATH | tr ':' ' '`
> +do
> + if [ "$PERL" = "" -a -s $i/perl ] ; then
> + PERL=$i/perl
> + fi
> +done
> +
Be careful here: Bourne-Shell is brain-dead in expansion semantics and tr and
test -s are unportable things. The above should be written this way:
if [ ".$PERL" = . ]; then
for i in . `echo $PATH | sed -e 's/:/ /g'`; do
if [ -f "$i/perl5" ]; then
PERL="$i/perl5"
break;
fi
if [ -f "$i/perl" ]; then
PERL="$i/perl"
break;
fi
done
fi
For essential details on such portability stuff I recommend you to look at the
various shells scripts in the Apache 1.3 distribution (especially the
top-level configure script and the stuff under src/helpers/). These are
programmed with maximum portability in mind and work really everywhere (even
under OS/2, etc.).
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]