foamUpdateCaseFileHeader: Correct version number check and error message

This commit is contained in:
Will Bainbridge
2017-08-24 10:04:47 +01:00
parent 3fe7aa77e6
commit d5a54e796f

View File

@ -75,9 +75,9 @@ do
esac esac
done done
echo "$version" | grep -Eq '^([0-9]\.[0-9]|dev)$' || \ echo "$version" | grep -Eq '^([0-9]\.[0-9x]|dev)$' || \
error "The version number is \"${version}\"." \ error "The version number is \"${version}\"." \
"The format must be MAJOR.MINOR (e.g. \"4.1\") or \"dev\"" "The format must be MAJOR.MINOR (e.g. \"$WM_PROJECT_VERSION\" or \"dev\")"
# constant width for version - default to WM_PROJECT_VERSION # constant width for version - default to WM_PROJECT_VERSION
version=$(printf %-36s "${version:-$WM_PROJECT_VERSION}") version=$(printf %-36s "${version:-$WM_PROJECT_VERSION}")