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 1RFmh3-0006WF-8C for ptxdist@pengutronix.de; Mon, 17 Oct 2011 14:53:25 +0200 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1RFmh3-0003TA-8m for ptxdist@pengutronix.de; Mon, 17 Oct 2011 14:53:25 +0200 Date: Mon, 17 Oct 2011 14:53:25 +0200 From: Michael Olbrich Message-ID: <20111017125325.GC3003@pengutronix.de> References: <1317833666-11917-1-git-send-email-andreas@biessmann.de> <1318262696-584-1-git-send-email-m.olbrich@pengutronix.de> <8d386ec882c49464e95a77a4f92dc68b@biessmann.de> <20111014140434.GE4886@pengutronix.de> <20111014150343.GA31488@regiomontanus.bwalle.de> <8827b632aa90795542df9b3ef705367b@biessmann.de> <20111017104526.GA25269@regiomontanus.bwalle.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20111017104526.GA25269@regiomontanus.bwalle.de> Subject: Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_* 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 On Mon, Oct 17, 2011 at 12:45:26PM +0200, Bernhard Walle wrote: > * Andreas Bie=DFmann [2011-10-17 09:06]: > > = > > >It's not really nice, but I think it's better than patching lots of > > >tools. And having scripts as executable programs is IMO still better > > >than having to call the interpreter manually (which is necessary with > > >your $PTXDIST_SED approach. > > = > > But how should we handle a script's sheebang? If we require the > > scripts/migrate tools to be executable scripts we need to preprocess > > the scripts to adopt the sheebang to e.g. $PTXDIST_BINDIR. I think > > it is much more portable to have the shell scripts kall the > > interpreter with the respective configuration, e.g. > > $PTXDIST_BINDIR/sed -f scripts/migrate/migrate_platform. > = > sed is the only exception I know that requires an argument. > #!/usr/bin/env perl, #!/usr/bin/env python, #!/usr/bin/env ruby works. Well, awk as well, but as long as it's in ptxdist itself, that's not a problem. We can call the program directly and let the shell do the rest. I'm more concerned about scripts called in various packages. And sed and awk are rarely called via a shebang. Regards, Michael -- = 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