mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] scripts/migrate: use env to find sed
Date: Tue, 4 Oct 2011 15:26:51 +0200	[thread overview]
Message-ID: <20111004132651.GA27444@pengutronix.de> (raw)
In-Reply-To: <1317368037-22674-1-git-send-email-andreas@biessmann.de>

Hi,

On Fri, Sep 30, 2011 at 09:33:57AM +0200, Andreas Bießmann wrote:
> Some systems do not provide /bin/sed (e.g. OS X), use env to find sed in
> $PATH.

but on Linux this results in:

/usr/bin/env: sed -f: No such file or directory
error: error occured during migration

It seems, adding extra arguments here is not portable.

Michael


> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
> This is a straight forward solution. Another solution is to preprocess the
> scripts in installation phase and insert the values find by configure. This
> could be necessary for handling e.g. gnu style argument splitting with '--' and
> special configurations. For me the gnu coreutils will have a 'g' before the tool
> (gchmod, gchown, ...) cause fink is installing it this way. I guess some other
> BSD users may have some similar problems. But currently there is no framework to
> pre-process some files in scripts directory. So here is the question, how could
> we handle this?
> I can think of some '*.in' files with special markers. They could be found by
> simple globbing in installation phase. Any other solutions?
> 
>  scripts/migrate/migrate_platform |    2 +-
>  scripts/migrate/migrate_ptx      |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
> index 22a58e4..80b3b04 100755
> --- a/scripts/migrate/migrate_platform
> +++ b/scripts/migrate/migrate_platform
> @@ -1,4 +1,4 @@
> -#!/bin/sed -f
> +#!/usr/bin/env sed -f
>  
>  #
>  # from   : ptxdist-1.99.20
> diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
> index 896959a..78691b3 100755
> --- a/scripts/migrate/migrate_ptx
> +++ b/scripts/migrate/migrate_ptx
> @@ -1,4 +1,4 @@
> -#!/bin/sed -f
> +#!/usr/bin/env sed -f
>  
>  #
>  # from   : ptxdist-1.99.10
> -- 
> 1.7.6.1
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2011-10-04 13:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30  7:33 Andreas Bießmann
2011-10-04 13:26 ` Michael Olbrich [this message]
2011-10-05 16:54 ` [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed Andreas Bießmann
2011-10-10 16:04   ` [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_* Michael Olbrich
2011-10-11 10:16     ` andreas
2011-10-14 14:04       ` Michael Olbrich
2011-10-14 15:03         ` Bernhard Walle
2011-10-17  7:06           ` Andreas Bießmann
2011-10-17 10:45             ` Bernhard Walle
2011-10-17 12:53               ` Michael Olbrich
2011-10-17  6:54         ` Andreas Bießmann
2011-10-17  7:10           ` Andreas Bießmann

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

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

  git send-email \
    --in-reply-to=20111004132651.GA27444@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox