configure: check for pandoc version properly.

This commit is contained in:
Luqman Aden 2012-10-18 20:58:57 -04:00
parent e0b71dd6b3
commit 3d76a75193

11
configure vendored
View File

@ -363,11 +363,12 @@ fi
if [ ! -z "$CFG_PANDOC" ]
then
PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
PANDOC_VER=${PANDOC_VER_LINE#pandoc }
PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]}
PV_MAJOR=${PV_MAJOR_MINOR%.[0-9]}
PV_MINOR=${PV_MAJOR_MINOR#[0-9].}
PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
PANDOC_VER=${PANDOC_VER_LINE#pandoc }
PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]*}
PV_MAJOR=${PV_MAJOR_MINOR%%[.][0-9]*}
PV_MINOR=${PV_MAJOR_MINOR#[0-9]*[.]}
PV_MINOR=${PV_MINOR%%[.][0-9]*}
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
then
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"