[PATCH] Tweaks to build process for embedded scripts

Ron Yorston rmy at pobox.com
Mon Nov 19 11:16:41 UTC 2018


Kang-Che Sung wrote:
>Script stripping should be optional, for at least two reasons:
>1. It's beyond the scope of the script embedding feature, and it would better
>be implemented and maintained as a separate tool.

I don't think it's out of scope.  If you're handing your scripts over
to the tender mercies of the BusyBox build process you should expect
stuff to happen to them.

Letting authors indulge their literary aspirations without bloating the
binary seems a nice feature to have.

>2. Vendor may sign the scripts or publish their hashes or do something with
>them so that every bit of the script must remain intact.

I suspect that most authors won't care.  Those who do need their scripts
to be untouched should just ensure the first line doesn't match either
of the regular expressions.  The old csh hack of putting ': /bin/sh'
on the first line would do, for example.  And has a nice retro feel.

Ron


More information about the busybox mailing list