/bin/sh portability question
- From
- Peter Eriksen <s022018@student.dtu.dk>
- Date
- Sep 23, 2005, 07:50 UTC
- Message-ID
- <20050923075058.GA25473@bohr.gbar.dtu.dk>
Hello,
It seems things are progressing nicely with regard to Solaris portability. However, I still have a few problems:
1) Maybe I didn't notice some new configuration option, but strcasestr is still not found with a simple "gmake".
2) In many of the shell scripts there is the idiom:
#!/bin/sh
cmd=
path=$(dirname $0)
case "$#" in
0) ;;
*) cmd="$1"
shift
When run, this gives the error:./git.sh: syntax error at line 4: `path=$' unexpected
I think it's because (on my Solaris at least), sh is really sh and is not symlinked to bash, and sh doesn't like that syntax. Are there any good solutions to this other than making the administrators actually change sh to a symlink, (which I tried)?
/Peter