|
From: | Daode |
Subject: | Re: [Groff] [PATCH] Use bash for several contrib scripts |
Date: | Thu, 02 Jan 2014 15:03:48 +0100 |
User-agent: | s-nail v14.5.1-28-g04da9bc |
Happy new year. Colin Watson <address@hidden> wrote: |+2014-01-02 Colin Watson <address@hidden> |+ |+ * contrib/eqn2graph/eqn2graph.sh: Use bash rather than sh; $RANDOM |+ is a bashism. |+ * contrib/grap2graph/grap2graph.sh: Likewise. |+ * contrib/pic2graph/pic2graph.sh: Likewise. I'd really rather do something like the below instead. Btw.: interesting that the auto-generated files like `configure' simply use $RANDOM, whereas the config.guess and such (i *never* used any auto*) do. Imho it is a bug that the generated scripts use /bin/sh but are not compatible to a real /bin/sh. --steffen diff --git a/contrib/eqn2graph/eqn2graph.sh b/contrib/eqn2graph/eqn2graph.sh index ee7cc5f..c85e06d 100644 --- a/contrib/eqn2graph/eqn2graph.sh +++ b/contrib/eqn2graph/eqn2graph.sh @@ -65,7 +65,7 @@ for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do && test -n "$tmp" && test -d "$tmp" \ && break - tmp=$d/eqn2graph$$-$RANDOM + tmp=$d/eqn2graph$$-${RANDOM:-${$}} (umask 077 && mkdir $tmp) 2> /dev/null && break done; if test -z "$tmp"; then diff --git a/contrib/grap2graph/grap2graph.sh b/contrib/grap2graph/grap2graph.sh index 58544e1..245e4ca 100644 --- a/contrib/grap2graph/grap2graph.sh +++ b/contrib/grap2graph/grap2graph.sh @@ -61,7 +61,7 @@ for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do && test -n "$tmp" && test -d "$tmp" \ && break - tmp=$d/grap2graph$$-$RANDOM + tmp=$d/grap2graph$$-${RANDOM:-${$}} (umask 077 && mkdir $tmp) 2> /dev/null && break done; if test -z "$tmp"; then diff --git a/contrib/pic2graph/pic2graph.sh b/contrib/pic2graph/pic2graph.sh index 72c5477..dccd9e7 100644 --- a/contrib/pic2graph/pic2graph.sh +++ b/contrib/pic2graph/pic2graph.sh @@ -75,7 +75,7 @@ for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do && test -n "$tmp" && test -d "$tmp" \ && break - tmp=$d/pic2graph$$-$RANDOM + tmp=$d/pic2graph$$-${RANDOM:-${$}} (umask 077 && mkdir $tmp) 2> /dev/null \ && break done;
--- Begin Message ---Subject: [Groff] [PATCH] Use bash for several contrib scripts Date: Thu, 2 Jan 2014 13:45:00 +0000 User-agent: Mutt/1.5.21 (2010-09-15) --- ChangeLog | 7 +++++++ contrib/eqn2graph/eqn2graph.sh | 2 +- contrib/grap2graph/grap2graph.sh | 2 +- contrib/pic2graph/pic2graph.sh | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index abf7534..33c5175 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-01-02 Colin Watson <address@hidden> + + * contrib/eqn2graph/eqn2graph.sh: Use bash rather than sh; $RANDOM + is a bashism. + * contrib/grap2graph/grap2graph.sh: Likewise. + * contrib/pic2graph/pic2graph.sh: Likewise. + 2013-12-23 Bernd Warken <address@hidden> groff/src/roff/groff/groff.cpp: add groff option `-G' to the diff --git a/contrib/eqn2graph/eqn2graph.sh b/contrib/eqn2graph/eqn2graph.sh index ee7cc5f..fb6f7f5 100644 --- a/contrib/eqn2graph/eqn2graph.sh +++ b/contrib/eqn2graph/eqn2graph.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # # eqn2graph -- compile EQN equation descriptions to bitmap images # diff --git a/contrib/grap2graph/grap2graph.sh b/contrib/grap2graph/grap2graph.sh index 58544e1..721c2b0 100644 --- a/contrib/grap2graph/grap2graph.sh +++ b/contrib/grap2graph/grap2graph.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # # grap2graph -- compile graph description descriptions to bitmap images # diff --git a/contrib/pic2graph/pic2graph.sh b/contrib/pic2graph/pic2graph.sh index 72c5477..c4a7781 100644 --- a/contrib/pic2graph/pic2graph.sh +++ b/contrib/pic2graph/pic2graph.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # # pic2graph -- compile PIC image descriptions to bitmap images # -- 1.8.5.2
--- End Message ---
random-fallback.diff
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |