[PATCH] Use "#!/usr/bin/env bash" to run a bash script
Giorgos Keramidas
keramida at ceid.upatras.gr
Sat Dec 30 19:12:42 UTC 2006
On 2006-12-30 20:05, Benoit Boissinot <bboissin at gmail.com> wrote:
> 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 ?)
Thanks!
Yes, printf(1) is portable enough. It is a POSIX utility, whose
behavior is specified in the Single UNIX Specification (version 3):
http://www.opengroup.org/onlinepubs/009695399/utilities/printf.html#tag_04_102
> 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'`
>
[...]
More information about the Mercurial-devel
mailing list