
On Tue, 2009-03-17 at 21:12 -0400, Brandon S. Allbery KF8NH wrote:
On 2009 Mar 17, at 20:28, Duncan Coutts wrote:
It works for me under Solaris 10. Perhaps Solaris 9 or older do not have a standard compliant /bin/sh program. What do you suggest we use instead as a workaround?
For backward compatibility reasons sh in Solaris 9 and earlier is not POSIX compliant. Use /usr/xpg4/bin/sh or /bin/bash instead.
(Unfortunately you can't cheat and define a shell function, although you could create a program called "!":
if ${1+"$@"}; then exit 1 else exit 0 fi
Actually this is what the script used 'til someone pointed out to me that sh has the ! syntax :-). I'll switch it back to using this style with a note to say why. Duncan - ! grep " ${PKG}-${VER_MATCH}" ghc-pkg.list > /dev/null 2>&1 + if grep " ${PKG}-${VER_MATCH}" ghc-pkg.list > /dev/null 2>&1 + then + return 1; + else + return 0; + fi + #Note: we cannot use "! grep" as Solaris 9 /bin/sh doesn't like it.