future-proofed version-checking regex in /bin/install #6

Open
jaschop wants to merge 1 commits from jaschop/after-dark:trunk into trunk
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ validate_hugo() {
fi
# Exit with error if not minimum required hugo version
re="v(0\d*\.([5-9][1-9]|[6-9])|[1-9]).*"
re="^hugo v((0\.((5[1-9])|([6-9][0-9])|([1-9][0-9][0-9])))|[1-9])"
if ! hugo version | grep -qE "$re"; then
echo "Error: After Dark requires Hugo version 0.51 or greater" >&2
exit 1