[auton-users] arch*.sh scripts
Paul Komarek
komarek at cmu.edu
Mon Jun 23 15:48:36 EDT 2003
On Mon, 2003-06-23 at 15:29, Dan Pelleg wrote:
> Paul Komarek writes:
> > On Mon, 2003-06-23 at 14:57, Dan Pelleg wrote:
> > > Both of the new scripts fail on FreeBSD because /bin/bash is not installed
> > > there. There are many other systems in which this is true as well.
> > >
> > > As far as I know /bin/sh is pretty much guaranteed to exist on any
> > > UNIX-like system.
> >
> > I agree that there are many borken systems out there. ;-)
> >
> > Would you mind checking for sh compatibility? On GNU/Linux systems, sh
> > is a symlink to bash, and bash doesn't completely disable all bash-isms
> > in sh-mode. Perhaps the easiest thing to do is symlink /bin/bash ->
> > /bin/sh and try running them.
> >
> > -Paul
>
> Paul already found one non-standard call ( $() instead of `` - I'd have
> missed this since the FreeBSD sh also happens to support this). Apart from
> that, "make" needs to be "gmake" everywhere.
>
I chose to use make because I've seen some GNU systems installing gmake
as "make" with no symlink to gmake.
> With this change I can make "sh ../smallbutuseful/archdir.sh" work.
>
Terrific!
> archexe.sh doesn't like the pushd/popd. Maybe just enclose a big chunk in a
> () block (meaning to spawn a subshell for it, which forget all the "cd"s
> you do after it terminates).
Dang, pushd/popd are awesome. I'll just save $PWD or whatever, since I
only need a one-element "stack".
-Paul
More information about the Autonlab-users
mailing list