configure: simplify pandoc version recognition.
The version recognition was failing for version 1.11, thinking the minor version was 1 rather than 11.
This commit is contained in:
parent
a56ec8c134
commit
218093d912
|
@ -406,12 +406,13 @@ fi
|
||||||
|
|
||||||
if [ ! -z "$CFG_PANDOC" ]
|
if [ ! -z "$CFG_PANDOC" ]
|
||||||
then
|
then
|
||||||
PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
|
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
|
||||||
PANDOC_VER=${PANDOC_VER_LINE#pandoc }
|
# extract the first 2 version fields, ignore everything else
|
||||||
PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]*}
|
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
|
||||||
PV_MAJOR=${PV_MAJOR_MINOR%%[.][0-9]*}
|
|
||||||
PV_MINOR=${PV_MAJOR_MINOR#[0-9]*[.]}
|
# these patterns are shell globs, *not* regexps
|
||||||
PV_MINOR=${PV_MINOR%%[.][0-9]*}
|
PV_MAJOR=${PV_MAJOR_MINOR% *}
|
||||||
|
PV_MINOR=${PV_MAJOR_MINOR#* }
|
||||||
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
|
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
|
||||||
then
|
then
|
||||||
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
|
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
|
||||||
|
|
Loading…
Reference in New Issue