"kpsewhich tcolorbox.sty" can be empty if tcolorbox is not available. If this is the case, "grep" in `grep ProvidePackage | sed ...` will wait forever. Add an empty check in front of "grep" with exit code of 1. Fixes: b2f19231bcc5 ("utilities/autodate.sh: Make newer tcolorbox behave as before") Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- Change since v2: o Refer to #5 in FAQ-BUILD.txt, as tcolorbox is not a font package. Change since v1: o Fix string comparison operator of shell script ("="). -- utilities/autodate.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utilities/autodate.sh b/utilities/autodate.sh index 7bd7cbb8..7d00738f 100644 --- a/utilities/autodate.sh +++ b/utilities/autodate.sh @@ -97,6 +97,13 @@ env printf '\\IfQqzBg{}{\\setboolean{qqzbg}{%s}}\n' $qqzbg # command for newer tcolorbox (4.40 or later) to have backward-compatible skips tcolorbox_sty=`kpsewhich tcolorbox.sty` + +if [ "$tcolorbox_sty" = "" ] +then + echo "Error: package 'tcolorbox' not found. See See #5 in FAQ-BUILD.txt" >&2 + exit 1 +fi + tcbversion=`grep ProvidesPackage $tcolorbox_sty | sed -e 's/.*version \([0-9]\+\.[0-9]\+\).*/\1/g'` tcbold=4.39 env printf '%% tcolorbox version: %s\n' $tcbversion -- 2.17.1