[PATCH] Fix typos and shell for MacOSX packaging scripts

Dirk Hohndel dirk at hohndel.org
Thu Oct 4 02:24:02 PDT 2012


Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> writes:

> 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.

It shouldn't. Upstream may have moved since the last release (0.7.0) was
built, but the diff between the launcher.sh in the release I used to
build the bundle and subsurface.sh is one line (I commented out the
incorrect DYLD_LIBRARY_PATH that breaks the MacPorts version of Gtk)
plus seven white space fixes.

>  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'.

Ok. We'll do that.

Thanks again for working on this. It's been a learning experience for
me.

/D


More information about the subsurface mailing list