summaryrefslogtreecommitdiff
path: root/resources/scripts/misc/versioncheck
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/misc/versioncheck')
-rwxr-xr-xresources/scripts/misc/versioncheck9
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/scripts/misc/versioncheck b/resources/scripts/misc/versioncheck
index 9ca82091..73fbb140 100755
--- a/resources/scripts/misc/versioncheck
+++ b/resources/scripts/misc/versioncheck
@@ -19,6 +19,10 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u
+. "include/err.sh"
+
+project="$(cat projectname)"
+
version="version-unknown"
[ -f version ] && version="$(cat version)"
version_="${version}"
@@ -37,3 +41,8 @@ if [ -e ".git" ]; then
versiondate="${versiondate_}"
printf "%s\n" "${versiondate}" > versiondate
fi
+
+if [ "${versiondate}" = "version-date-unknown" ] || \
+ [ "${version}" = "version-unknown" ]; then
+ err "cannot determine ${projectname} revision"
+fi