From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RB51H-0002aJ-5z for ptxdist@pengutronix.de; Tue, 04 Oct 2011 15:26:51 +0200 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1RB51H-0007zr-58 for ptxdist@pengutronix.de; Tue, 04 Oct 2011 15:26:51 +0200 Date: Tue, 4 Oct 2011 15:26:51 +0200 From: Michael Olbrich Message-ID: <20111004132651.GA27444@pengutronix.de> References: <1317368037-22674-1-git-send-email-andreas@biessmann.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1317368037-22674-1-git-send-email-andreas@biessmann.de> Subject: Re: [ptxdist] [PATCH] scripts/migrate: use env to find sed Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi, On Fri, Sep 30, 2011 at 09:33:57AM +0200, Andreas Bie=DFmann 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=DFmann > --- > This is a straight forward solution. Another solution is to preprocess the > scripts in installation phase and insert the values find by configure. Th= is > 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 t= he 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 frame= work 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 foun= d 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_p= latform > 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