Another issue: The self-contained exec can contain the unicode data base and the external formats. I've tested that. But the executable can't save another executable image because the link shell script can't be found. To be truly self-contained, it would have to be stored in C code and written out at some point. Or the script would need to be converted into C. Neither of these appeal to me, but at least the former could be somewhat automated. Still kind of gross.
I have recently converted a biggish shell script (used to test XCVB) into pure Lisp code using run-program (see xcvb/t/sub-xcvb.lisp), and I'm soooo glad I don't have to write shell scripts anymore.
That said, you could also save the script to a string, and invoke /bin/sh -c '...'
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Lie, n.: A very poor substitute for the truth, but the only one discovered to date.