Hi! sartek said you need some SunOS shell-foo.
divVerent wrote:This must be a weird shell...
Yes, it is. :)
POSIX requires the presense of a POSIX conformant shell impementation, but it does not state it should be /bin/sh.
And on SunOS its not a POSIX shell (/usr/xpg4/bin/sh is the POSIX).
Nesting quotes is something should be avoided at all times.
You can't know if a shell will parse it lazy or greedy.
You have made a false assumption, that it will eval from outside
to inside, but SunOS's /bin/sh parsed it left-to-right, so you got something like this:
"... if [ some test ]; then echo "
...which is of course wrong.
Also don't use subshell executions, because they take additional
resources and make the script slower (and ugly as SunOS /bin/sh doesnt know the $() syntax).
if [ -n "" ]; then
MODPLUG_FLAGS="/libmodplug.a -lstdc++"
else
MODPLUG_FLAGS=""
fi
echo bin-release \
DP_MAKE_TARGET=sunos DP_SOUND_API=OSS \
EXE="nexuiz-glx" \
LDFLAGS_COMMON="-lm -ldl -lsocket -lnsl -R/usr/X11R6/lib \
-L/usr/X11R6/lib -lX11 -lXpm -lXext -lXxf86vm $MODPLUG_FLAGS"
PS.: See
http://wiki.netbsd.se/The_pkgsrc_portab ... de#Solaris for more shell strangeness.