hlib gives "Illegal variable name" error
aggibb opened this issue · 3 comments
Building Starlink on Ubuntu 12.04 (with tcsh as my shell) I ran into the above error, which comes from running hlib on the .hlp files. The tcsh man page says that the status check, $?
, is a tcsh enhancement and is not in csh. The first line of hlib is:
#!/bin/csh -f
and if I change it to tcsh
, hlib runs fine. Alternatively, changing $?
to $status
works. Any preferences for which change to implement? I'm not sure of the ubiquity of tcsh so perhaps the latter would be preferable?
What I find odd is that I've never run into this error before, even with a previous build on the same OS, and I've always used tcsh.
If $status
is portable then that's fine. csh
must be an alias for tcsh
on OS X then (and presumably the CentOS builds that Jenkins uses at JAC).
The csh
man page makes no mention of $?
but does state that the status
shell variable contains the exit status for the last command. I take this to mean that $status
should be portable since the tcsh
man page specifically lists $?
is equivalent to $status
.
Patch at will.