We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dfedcc3 + 218093d commit 2815328Copy full SHA for 2815328
configure
@@ -444,12 +444,13 @@ fi
444
445
if [ ! -z "$CFG_PANDOC" ]
446
then
447
- PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
448
- PANDOC_VER=${PANDOC_VER_LINE#pandoc }
449
- PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]*}
450
- PV_MAJOR=${PV_MAJOR_MINOR%%[.][0-9]*}
451
- PV_MINOR=${PV_MAJOR_MINOR#[0-9]*[.]}
452
- PV_MINOR=${PV_MINOR%%[.][0-9]*}
+ PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
+ # extract the first 2 version fields, ignore everything else
+ sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
+
+ # these patterns are shell globs, *not* regexps
+ PV_MAJOR=${PV_MAJOR_MINOR% *}
453
+ PV_MINOR=${PV_MAJOR_MINOR#* }
454
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
455
456
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
0 commit comments