* [PATCH] utilities/autodate.sh: too many \s
@ 2017-01-16 23:41 Trevor Woerner
2017-01-17 11:30 ` Akira Yokosawa
0 siblings, 1 reply; 9+ messages in thread
From: Trevor Woerner @ 2017-01-16 23:41 UTC (permalink / raw)
To: perfbook
Remove extraneous \ which causes build to fail:
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 \\n
ewcommand{\\commityear}{2017}
?
! Emergency stop.
...
l.2 \\n
ewcommand{\\commityear}{2017}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
utilities/autodate.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utilities/autodate.sh b/utilities/autodate.sh
index 6df8f99..84b4ea7 100644
--- a/utilities/autodate.sh
+++ b/utilities/autodate.sh
@@ -45,4 +45,4 @@ year=`date --date="$date_str" +%Y`
day=`date --date="$date_str" +%e`
echo "\\date{$month $day, $year$modified}"
-echo "\\\newcommand{\\\commityear}{$year}"
+echo "\\newcommand{\\commityear}{$year}"
--
2.11.0.258.ge05806d
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] utilities/autodate.sh: too many \s 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-18 17:00 ` [PATCH] utilities/autodate.sh: too many \s Trevor Woerner 0 siblings, 2 replies; 9+ messages in thread From: Akira Yokosawa @ 2017-01-17 11:30 UTC (permalink / raw) To: Trevor Woerner; +Cc: Paul E. McKenney, perfbook, akiyks On 2017/01/16 18:41:25 -0500, Trevor Woerner wrote: > Remove extraneous \ which causes build to fail: Hi Trevor, Apologies for submitting a non portable script. I assumed that if a script works on "dash", it should work on other sh variants. But it was a wrong assumption. I should have tested on "bash" at least. I'm submitting a patch of the script with portability in mind. Can you try it? Thanks, Akira ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] autodate.sh: Use printf instead of echo 2017-01-17 11:30 ` Akira Yokosawa @ 2017-01-17 11:33 ` Akira Yokosawa 2017-01-19 2:33 ` Trevor Woerner 2017-01-18 17:00 ` [PATCH] utilities/autodate.sh: too many \s Trevor Woerner 1 sibling, 1 reply; 9+ messages in thread From: Akira Yokosawa @ 2017-01-17 11:33 UTC (permalink / raw) To: Trevor Woerner, Paul E. McKenney; +Cc: perfbook, akiyks 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> 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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] autodate.sh: Use printf instead of echo 2017-01-17 11:33 ` [PATCH] autodate.sh: Use printf instead of echo Akira Yokosawa @ 2017-01-19 2:33 ` Trevor Woerner 2017-01-19 11:16 ` [PATCH v2] autodate.sh: Use printf command " Akira Yokosawa 0 siblings, 1 reply; 9+ messages in thread From: Trevor Woerner @ 2017-01-19 2:33 UTC (permalink / raw) To: Akira Yokosawa; +Cc: Paul E. McKenney, perfbook 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 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] autodate.sh: Use printf command instead of echo 2017-01-19 2:33 ` Trevor Woerner @ 2017-01-19 11:16 ` Akira Yokosawa 2017-01-20 15:01 ` Akira Yokosawa 0 siblings, 1 reply; 9+ messages in thread From: Akira Yokosawa @ 2017-01-19 11:16 UTC (permalink / raw) To: Paul E. McKenney; +Cc: Trevor Woerner, perfbook, akiyks From b981648ff25387ecea68b55350671c55ad894884 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@gmail.com> Date: Tue, 17 Jan 2017 20:04:54 +0900 Subject: [PATCH v2] autodate.sh: Use printf command 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 ("Make date of git commit be reflected automatically") Reported-by: Trevor Woerner <twoerner@gmail.com> Tested-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Akira Yokosawa <akiyks@gmail.com> --- v2: Changes in commit log o Tested-by from Trevor o Title of fixed commit 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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] autodate.sh: Use printf command instead of echo 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 0 siblings, 1 reply; 9+ messages in thread From: Akira Yokosawa @ 2017-01-20 15:01 UTC (permalink / raw) To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa On 2017/01/19 20:16, Akira Yokosawa wrote: >>From b981648ff25387ecea68b55350671c55ad894884 Mon Sep 17 00:00:00 2001 > From: Akira Yokosawa <akiyks@gmail.com> > Date: Tue, 17 Jan 2017 20:04:54 +0900 > Subject: [PATCH v2] autodate.sh: Use printf command 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 ("Make date of git commit be reflected automatically") > Reported-by: Trevor Woerner <twoerner@gmail.com> > Tested-by: Trevor Woerner <twoerner@gmail.com> > Signed-off-by: Akira Yokosawa <akiyks@gmail.com> > --- > v2: Changes in commit log > o Tested-by from Trevor > o Title of fixed commit Well, seems like I should have put the "Tested-by:" from Trevor below my "Signed-off-by:" to respect the chain of event. If it is not too late, can you reorder them for me? Thanks, Akira > > 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 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] autodate.sh: Use printf command instead of echo 2017-01-20 15:01 ` Akira Yokosawa @ 2017-01-23 0:58 ` Paul E. McKenney 0 siblings, 0 replies; 9+ messages in thread From: Paul E. McKenney @ 2017-01-23 0:58 UTC (permalink / raw) To: Akira Yokosawa; +Cc: perfbook On Sat, Jan 21, 2017 at 12:01:59AM +0900, Akira Yokosawa wrote: > On 2017/01/19 20:16, Akira Yokosawa wrote: > >>From b981648ff25387ecea68b55350671c55ad894884 Mon Sep 17 00:00:00 2001 > > From: Akira Yokosawa <akiyks@gmail.com> > > Date: Tue, 17 Jan 2017 20:04:54 +0900 > > Subject: [PATCH v2] autodate.sh: Use printf command 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 ("Make date of git commit be reflected automatically") > > Reported-by: Trevor Woerner <twoerner@gmail.com> > > Tested-by: Trevor Woerner <twoerner@gmail.com> > > Signed-off-by: Akira Yokosawa <akiyks@gmail.com> > > --- > > v2: Changes in commit log > > o Tested-by from Trevor > > o Title of fixed commit > > Well, seems like I should have put the "Tested-by:" from Trevor > below my "Signed-off-by:" to respect the chain of event. > If it is not too late, can you reorder them for me? You got lucky, internet-access troubles. ;-) Queued and pushed with the Tested-by and Signed-off-by reversed. Thanx, Paul > Thanks, Akira > > > > > 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 > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] utilities/autodate.sh: too many \s 2017-01-17 11:30 ` Akira Yokosawa 2017-01-17 11:33 ` [PATCH] autodate.sh: Use printf instead of echo Akira Yokosawa @ 2017-01-18 17:00 ` Trevor Woerner 2017-01-18 22:15 ` Akira Yokosawa 1 sibling, 1 reply; 9+ messages in thread From: Trevor Woerner @ 2017-01-18 17:00 UTC (permalink / raw) To: Akira Yokosawa; +Cc: Paul E. McKenney, perfbook Hi Akira, On Tue 2017-01-17 @ 08:30:57 PM, Akira Yokosawa wrote: > On 2017/01/16 18:41:25 -0500, Trevor Woerner wrote: > > Remove extraneous \ which causes build to fail: > I'm submitting a patch of the script with portability in mind. > Can you try it? Yes, this patch works for me. Thanks for the update, sorry for the delay. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] utilities/autodate.sh: too many \s 2017-01-18 17:00 ` [PATCH] utilities/autodate.sh: too many \s Trevor Woerner @ 2017-01-18 22:15 ` Akira Yokosawa 0 siblings, 0 replies; 9+ messages in thread From: Akira Yokosawa @ 2017-01-18 22:15 UTC (permalink / raw) To: Trevor Woerner; +Cc: Paul E. McKenney, perfbook, akiyks On 2017/01/18 12:00:32 -0500, Trevor Woerner wrote: > Hi Akira, > > On Tue 2017-01-17 @ 08:30:57 PM, Akira Yokosawa wrote: >> On 2017/01/16 18:41:25 -0500, Trevor Woerner wrote: >>> Remove extraneous \ which causes build to fail: >> I'm submitting a patch of the script with portability in mind. >> Can you try it? > > Yes, this patch works for me. Thanks for the update, sorry for the delay. Thanks for testing! Can I get your Tested-by:? Thanks, Akira ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-01-23 0:58 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.