From: Trevor Woerner <twoerner@gmail.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
perfbook@vger.kernel.org
Subject: Re: [PATCH] autodate.sh: Use printf instead of echo
Date: Wed, 18 Jan 2017 21:33:17 -0500 [thread overview]
Message-ID: <20170119023317.GA15981@linux-uys3> (raw)
In-Reply-To: <898ffe7c-cc25-773d-28a1-ff9c7f9c97e0@gmail.com>
On Tue 2017-01-17 @ 08:33:10 PM, Akira Yokosawa wrote:
> From bcd083c6be7cd9c69d1e05d19d732c32147bfd9a Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Tue, 17 Jan 2017 20:04:54 +0900
> Subject: [PATCH] autodate.sh: Use printf instead of echo
>
> Using "echo" command to generate output containing "\" characters
> caused a build error depending on the variant of "sh".
> For portability, we should use "printf" via "env" command.
>
> Fixes: 878bf8160a5c
> Reported-by: Trevor Woerner <twoerner@gmail.com>
Tested-by: Trevor Woerner <twoerner@gmail.com>
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
> utilities/autodate.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/utilities/autodate.sh b/utilities/autodate.sh
> index 6df8f99..a56bc70 100644
> --- a/utilities/autodate.sh
> +++ b/utilities/autodate.sh
> @@ -35,7 +35,7 @@ else
> gitstatus=`git status --porcelain | wc -l`
> if [ $gitstatus != "0" ]
> then
> - modified=" (m)"
> + modified="(m)"
> else
> modified=""
> fi
> @@ -44,5 +44,5 @@ month=`date --date="$date_str" +%B`
> year=`date --date="$date_str" +%Y`
> day=`date --date="$date_str" +%e`
>
> -echo "\\date{$month $day, $year$modified}"
> -echo "\\\newcommand{\\\commityear}{$year}"
> +env printf "\\date{%s %s, %s %s}\n" $month $day $year $modified
> +env printf "\\\newcommand{\\\commityear}{%s}\n" $year
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2017-01-19 2:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 23:41 [PATCH] utilities/autodate.sh: too many \s Trevor Woerner
2017-01-17 11:30 ` Akira Yokosawa
2017-01-17 11:33 ` [PATCH] autodate.sh: Use printf instead of echo Akira Yokosawa
2017-01-19 2:33 ` Trevor Woerner [this message]
2017-01-19 11:16 ` [PATCH v2] autodate.sh: Use printf command " Akira Yokosawa
2017-01-20 15:01 ` Akira Yokosawa
2017-01-23 0:58 ` Paul E. McKenney
2017-01-18 17:00 ` [PATCH] utilities/autodate.sh: too many \s Trevor Woerner
2017-01-18 22:15 ` Akira Yokosawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170119023317.GA15981@linux-uys3 \
--to=twoerner@gmail.com \
--cc=akiyks@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=perfbook@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox