incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah Slater <nsla...@apache.org>
Subject Re: Solaris
Date Thu, 20 Nov 2008 07:41:44 GMT
On Thu, Nov 20, 2008 at 05:59:18AM +0100, Maarten Thibaut wrote:
> The bin.diff fixes 3 occurrences like this, where an "if ! something" is
> done. Sadly, that doesn't work on solaris /bin/sh:
>
> if ! echo 2> /dev/null >> $PID_FILE; then
>
> Replaced by:
>
> echo 2> /dev/null >> $PID_FILE
> if [ $? -gt 0 ]; then

My local "checkbashisms" doesn't seem to complain at all. The [ ... ] syntax is
just a shortcut for "test" and I would prefer to avoid it if possible. Could you
check for me that using "test expr" wouldn't work in its place.

if test ! echo 2> /dev/null >> $PID_FILE; then
   echo foo
fi

> The second is for etc/init/couchdb.tpl.in and is a one liner. $
> (executable) doesn't work in sh, so replaced it with `executable`.

This seems reasonable, though checkbashisms doesn't report anything.

I am wondering if your Solaris shell is POSIXly correct. Could you provide me
with a pointer to its manual, please?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater

Mime
View raw message