Hello!

Andreas Enge <andr...@enge.fr> skribis:

> in texlive, there are lots of scripts to be installed in share; thus, the 
> patch-shebang phase does not catch them.

Do you know why it doesn’t catch them?  The ‘patch-source-shebangs’
phase patches all the files found under “.”, recursively.  Did you by
any chance disable that phase?  Could you check in the log?

> I tried the following:
>
>    (substitute* (find-files "." "")
>      (("^#!/bin/sh") (string-append "#!" (which "bash"))))
>
> This chokes on binary files,

Yes, it’s not supposed to be used on binary files.

Instead, you should use the ‘patch-shebang’ procedure, which is
specifically written to gracefully handle that situation (see
guix/build/utils.scm).

HTH,
Ludo’.

Reply via email to