Hello, in texlive, there are lots of scripts to be installed in share; thus, the patch-shebang phase does not catch them. I tried the following:
(substitute* (find-files "." "") (("^#!/bin/sh") (string-append "#!" (which "bash")))) This chokes on binary files, in this case on a "Compiled terminfo entry" with the following message: ... In unknown file: ?: 1 [regexp-exec # ...] In ice-9/boot-9.scm: 106: 0 [#<procedure 2a43840 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...] ice-9/boot-9.scm:106:20: In procedure #<procedure 2a43840 at ice-9/boot-9.scm:97:6 (thrown-k . args)>: ice-9/boot-9.scm:106:20: string contains #\nul character: "\x1a\x01! \x00%\x00!\x00\x82\x016\x01vt100|vt100-am|vt100am|DEC vt100\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00P\x00\b\x00\x18\x00ÿÿÿÿÿÿ\x03\x00ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ! \x005\x007\x00.\x01-\x00\x91\x00ÿÿÿÿÿÿk\x00S\x00\x95\x00ÿÿH\x00ÿÿÿÿ^\x00ÿÿ| \x00ÿÿ\x89\x00ÿÿÿÿÿÿÿÿ#\x00(\x00ÿÿÿÿÿÿÿÿÿÿÿÿÅ\x00$\x01)\x01ÿÿÿÿ\x18\x01ÿÿ\x8d\x00ÿÿñ\x00õ\x00ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ\xa0\x00ÿÿÿÿÿÿÿÿÿÿ¦\x00ÿÿÿÿÿÿÿÿ²\x00ÿÿ¶\x00º\x00¾\x00ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¢\x00ÿÿÿÿÿÿª\x00ÿÿÿÿÿÿ®\x00é\x00\x1c\x01ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3\x01ÿÿÿÿÿÿU\x00ÿÿÿÿÿÿJ\x00b\x00ÿÿ\x80\x00ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿù\x00ÿÿÊ\x00Â\x00ÿÿ\x15\x01\x9e\x00æ\x00ÿÿ\x9b\x00ÿÿ\x99\x00ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvt100| vt100-am|vt100am|DEC vt100\x00\a\x00\x1b[5m\x00\x1b[1m\x00\x1b[H\x1b[2J\x00\r\x00\x1b[%i%p1%d; %p2%dr\x00\b\x00\x1b[%p1%dD\x00\n" Would there be a way to make this more robust? Or to obtain a "find-file" that returns only text files? Andreas