# extract the first 2 version fields, ignore everything else
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
+ MIN_PV_MAJOR="1"
+ MIN_PV_MINOR="9"
# these patterns are shell globs, *not* regexps
PV_MAJOR=${PV_MAJOR_MINOR% *}
PV_MINOR=${PV_MAJOR_MINOR#* }
- if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
+ if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
then
- step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
+ step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
BAD_PANDOC=1
fi
fi
fi
fi
+BIN_SUF=
+if [ $CFG_OSTYPE = "pc-mingw32" ]
+then
+ BIN_SUF=.exe
+fi
+
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
then
- if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ]
+ if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
then
err "no local rust to use"
else
- LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version`
- step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: " $LRV
+ LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
+ step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
fi
fi