unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas@enge.fr>
Cc: bug-guix@gnu.org
Subject: Re: More robust substitute*
Date: Sat, 02 Feb 2013 17:23:31 +0100	[thread overview]
Message-ID: <878v767kho.fsf@gnu.org> (raw)
In-Reply-To: <201302021714.13440.andreas@enge.fr> (Andreas Enge's message of "Sat, 2 Feb 2013 17:14:13 +0100")

Hello!

Andreas Enge <andreas@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	other threads:[~2013-02-02 16:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 16:14 More robust substitute* Andreas Enge
2013-02-02 16:23 ` Ludovic Courtès [this message]
2013-02-02 17:22   ` Andreas Enge
2013-02-03 17:56     ` Ludovic Courtès
2013-02-03 18:03       ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878v767kho.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=andreas@enge.fr \
    --cc=bug-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).