[FFmpeg-devel] [RFC/PATCH]Allow to use ancient bash to make version.h
Clément Bœsch
u at pkh.me
Thu Jun 19 19:15:59 CEST 2014
On Thu, Jun 19, 2014 at 06:58:50PM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> A user reported that Solaris / Oracle /bin/sh does not allow to build
> version.h. I was able to reproduce this with heirloom-sh from
> http://heirloom.sourceforge.net/sh.html
> Attached patch fixes the issue here, also tested with bash, ksh and dash.
>
> Please comment, Carl Eugen
>
> $ sh version.sh .
> version.sh: syntax error at line 7: `revision=$' unexpected
> diff --git a/version.sh b/version.sh
> index 92edcb9..139795f 100755
> --- a/version.sh
> +++ b/version.sh
> @@ -3,19 +3,18 @@
> # Usage: version.sh <ffmpeg-root-dir> <output-version.h> <extra-version>
>
> # check for git short hash
> -if ! test "$revision"; then
> - revision=$(cd "$1" && git describe --tags --match N 2> /dev/null)
> -fi
> +test "$revision" ||
> + revision=`cd "$1" && git describe --tags --match N 2> /dev/null`
This is a joke, right? :)
What version of bash is that?
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140619/bdfe59bb/attachment.asc>
More information about the ffmpeg-devel
mailing list