SuperScript/trigger — pull request #2 by matthewstory (2012-06-02 20:39:06+00:00)
Title: build is broken when using dash as /bin/sh

dash's '.' built-in does not work with non-contexted paths (e.g. relative paths not starting with './' or '../'):

$ touch 1 && sh -c '. 1'
.: 1: 1: not found

I will file the bug upstream with the dash maintainers to resolve this as it is a violation of the standard, but i have provided a patch that resolves the build issues when using dash:

.: 55: default.a.build: not found
sh makefile.build default.build trigger-pull trigger-pull
.: 55: default.build: not found
sh makefile.build default.o.build trigger-wait.o trigger-wait
.: 55: default.o.build: not found
sh makefile.build default.build trigger-wait trigger-wait
.: 55: default.build: not found
sh makefile.build default.o.build trigger-listen.o trigger-listen
.: 55: default.o.build: not found
sh makefile.build default.build trigger-listen trigger-listen
.: 55: default.build: not found
sh makefile.build default.build it it
.: 55: default.build: not found
cp: cannot stat `compile/trigger-pull': No such file or directory
package/build: fatal: cannot cp -p compile/trigger-pull command/trigger-pull{new}

Fix is to prefix the '.' invocation of $build_it_cmd with './', yielding "./$build_it_cmd" in build_do() in makefile.build. An additional issue resulting from this dash bug is that the invocation of the build_it function in makefile.build is non-safe, which will allow an unsuccessful build to proceed. I have also resolved this issue.

Will update issue with the dash upstream bug information, pull-request coming.