summaryrefslogtreecommitdiff
blob: d4db66bcb4406e660c3351bc47aa76c908a7438d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Index: revision
===================================================================
--- revision	(revision 5475)
+++ revision	(working copy)
@@ -18,15 +18,17 @@
 ###############################################################################
 
 . "`dirname "${0}"`/prologue.sh"
+set -e
 
-[ "${#}" -eq 0 ] && syntaxError "missing source root."
+[ "${#}" -gt 0 ] || syntaxError "missing source root"
 sourceRoot="${1}"
 shift
 
-[ "${#}" -eq 0 ] || syntaxError "too many parameters."
+[ "${#}" -eq 0 ] || syntaxError "too many parameters"
 
-set -e
-revision="`svnversion -n "${sourceRoot}"`"
+revision="`svnversion -n "${sourceRoot}" 2>/dev/null`" || semanticError "build revision cannot be determined - subversion not installed"
 [ "${revision}" != "exported" ] || revision=""
-[ -z "${revision}" ] || echo "${revision}"
+[ -n "${revision}" ] || semanticError "build revision not known"
+
+echo "${revision}"
 exit 0