[PATCH] Fix typos and shell for MacOSX packaging scripts

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Thu Oct 4 02:10:27 PDT 2012


On Thu, 4 Oct 2012, Dirk Hohndel wrote:
> Henrik Brautaset Aronsen <subsurface at henrik.synth.no> writes:
> >> Thing is, as it stands, '#!/bin/bash' is required.  The script would break
> >> if run under shells not supporting bashisms.
> >
> > Thing is, I can't understand what's wrong with using bash here. Bash
> > will be in OSX "forever", and we get the (fairly important) added bonus
> > of easy merges when launcher.sh changes.
> >
> > If we change subsurface.sh to something very different from launcher.sh,
> > we lose that.
>
> Much as I hate to admit it, I think I have to reverse my earlier
> position and instead agree with Henrik.
>
> Cristian, I may have sent you off on a wild goose chase - maybe we are
> better off keeping this shell script pretty much the same as launcher.sh.

It's ok with me.  I won't fight against the wind mills ;)

I had a _quick look_ at launcher.sh and it looks different from
subsurface.sh in many parts.  I also found just one bashism in
launcher.sh:

	possible bashism in launcher.sh line 125 (should be '.', not 'source'):
	  source "$bundle_res/environment.sh"

which is easyly fixed with a '. "$bundle_res/environment.sh"'.  All
other bashisms in subsurface.sh are new edits.  Diverging from
launcher.sh in that way will not make merging to subsurface.sh easy.

> My apologies for encouraging you to go down the path of making this more
> portable and readable - I will keep it as is for now.

It's your call.  But, in that case, it's better to set the shebang
line to '#!/bin/bash'.


Cheers,

-- 
Cristian


More information about the subsurface mailing list