Re: [PHP4BETA] setup
| From: | Sascha Schumann | Date: | Sat, 24 Apr 1999 20:23:13 +0000 |
| Subject: | Re: [PHP4BETA] setup | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-476@lists.php.net to get a copy of this message | ||
On Sat, Apr 24, 1999 at 03:03:56PM -0500, Andrey Zmievski wrote:
> I figured out why preconfig didn't work as intended.
>
> if ! cmp configure.in.in configure.in.new > /dev/null 2>&1; then
> mv configure.in.new configure.in
> else
> rm -f configure.in.new
> fi
>
> This test didn't work on my system (Solaris 2.7). So I changed it to:
>
> cmp configure.in.in configure.in.new > /dev/null 2>&1
> if [ $? -ne 0 ]; then
> mv configure.in.new configure.in
> else
> rm -f configure.in.new
> fi
>
> And it worked. Was this script written on a Linux box? If yes, then I think
> /bin/sh on Linux is a symlink to bash so it may work there. Should this
> script be modified so it's portable on every sh? I can submit a patch if
> Stig doesn't mind.
Well, [ is not too compatible either.
if test $? -ne 0 ; then
...
fi
should work everywhere. And while we are at shell programming, one should not
omit the space in "#! /bin/sh" since some Unices recognize the "#! /" as a
magic number.
--
Regards,
Sascha Schumann |
Consultant | finger sas@schell.de
| for PGP public key
--
PHP 4 Beta