]> git.lizzy.rs Git - rust.git/commitdiff
Check pandoc's version correctly for >=1.10.
authorTony Young <tony@rfw.name>
Thu, 18 Oct 2012 09:56:22 +0000 (22:56 +1300)
committerTony Young <tony@rfw.name>
Thu, 18 Oct 2012 11:30:17 +0000 (00:30 +1300)
configure

index 40c6acead0efa3d937f3987c39015d58b3f6d2e4..cd500b6ec43a1cfb39102c247192396b554c39f6 100755 (executable)
--- a/configure
+++ b/configure
@@ -362,10 +362,10 @@ fi
 
 if [ ! -z "$CFG_PANDOC" ]
 then
-    PV=$(pandoc --version | awk '/^pandoc/ {print $2}')
-    if [ "$PV" \< "1.8" ]
+    read PV_MAJOR PV_MINOR <<<$(pandoc --version | awk '/^pandoc/ {split($2, PV, "."); print PV[1] " " PV[2]}')
+    if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
     then
-       step_msg "pandoc $PV is too old. disabling"
+       step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
        BAD_PANDOC=1
     fi
 fi