bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More robust substitute*


From: Ludovic Courtès
Subject: Re: More robust substitute*
Date: Sat, 02 Feb 2013 17:23:31 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hello!

Andreas Enge <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]