[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/21] git-version-gen: remove CR as well
From: |
Eric Blake |
Subject: |
Re: [PATCH 03/21] git-version-gen: remove CR as well |
Date: |
Mon, 01 Dec 2014 07:19:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 11/29/2014 09:20 PM, KO Myung-Hun wrote:
> On OS/2, a new line consists of CR and LF.
>
> * build-aux/git-version-gen: Remove CR as well.
> ---
> build-aux/git-version-gen | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
> index 47d6576..77fb2ad 100755
> --- a/build-aux/git-version-gen
> +++ b/build-aux/git-version-gen
> @@ -127,6 +127,7 @@ fi
>
> tag_sed_script="${tag_sed_script:-s/x/x/}"
>
> +cr=`printf '\r'`
This is probably not portable. While it is guaranteed to produce a
carriage return, the use inside `` may cause that carriage return to
again be stripped before assigning the empty string to $cr (depending on
whether the shell strips trailing CR in addition to NL).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH 03/21] git-version-gen: remove CR as well,
Eric Blake <=