File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 406406
407407if [ ! -z " $CFG_PANDOC " ]
408408then
409- PANDOC_VER_LINE=$( pandoc --version | grep ' ^pandoc ' )
410- PANDOC_VER=${PANDOC_VER_LINE# pandoc }
411- PV_MAJOR_MINOR=${PANDOC_VER% .[0-9]* }
412- PV_MAJOR=${PV_MAJOR_MINOR%% [.][0-9]* }
413- PV_MINOR=${PV_MAJOR_MINOR# [0-9]* [.]}
414- PV_MINOR=${PV_MINOR%% [.][0-9]* }
409+ PV_MAJOR_MINOR=$( pandoc --version | grep ' ^pandoc ' |
410+ # extract the first 2 version fields, ignore everything else
411+ sed ' s/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/' )
412+
413+ # these patterns are shell globs, *not* regexps
414+ PV_MAJOR=${PV_MAJOR_MINOR% * }
415+ PV_MINOR=${PV_MAJOR_MINOR#* }
415416 if [ " $PV_MAJOR " -lt " 1" ] || [ " $PV_MINOR " -lt " 8" ]
416417 then
417418 step_msg " pandoc $PV_MAJOR .$PV_MINOR is too old. disabling"
You can’t perform that action at this time.
0 commit comments