[PATCH] Use "#!/usr/bin/env bash" to run a bash script

Benoit Boissinot bboissin at gmail.com
Sat Dec 30 19:05:36 UTC 2006


On 12/30/06, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> On 2006-12-30 16:17, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> > # HG changeset patch
> > # User Giorgos Keramidas <keramida at ceid.upatras.gr>
> > # Date 1167487843 -7200
> > # Node ID 641c3bb47e839842f05e28a86473efc6555a49ac
> > # Parent  050d88306939bd477fc0fda6333db9ab8b8ff2a0
> > Use "#!/usr/bin/env bash" to run a bash script
> >

A more correct fix is probably the following (is printf portable enough ?)

diff -r 04d919cdf263 tests/test-issue352
--- a/tests/test-issue352	Tue Dec 26 20:08:09 2006 +0100
+++ b/tests/test-issue352	Sat Dec 30 20:04:37 2006 +0100
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 # http://www.selenic.com/mercurial/bts/issue352

 hg init foo
 cd foo

-A=`echo -e -n 'he\rllo'`
+A=`printf 'he\rllo'`

 echo foo > "hell
 o"



More information about the Mercurial-devel mailing list