summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2009-02-22 12:07:34 -0500
committerJameson Graef Rollins <jrollins@finestructure.net>2009-02-22 12:07:34 -0500
commite71c7bb4dff26178f714cd0fcdbb3058effa4066 (patch)
treec783044f2a5e9ed1703076db1627d6e56989a3c6 /src/share
parent4c4ce4467921a05e70825edf2331d359dc63b879 (diff)
Fix how version number is saved/retrieved. Version is now stored in
VERSION file, which is created in the tarball target. This is then installed at /usr/share/monkeysphere/VERSION, and cat'ed when the version number is requested by the front-end ui. No more manual setting of version number required (to avoid future problems, aka "0.23.1"). This system is also more flexible, as the VERSION file could potentially hold more info than just the release number.
Diffstat (limited to 'src/share')
-rw-r--r--src/share/common8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/share/common b/src/share/common
index 0c26a91..b2dcd35 100644
--- a/src/share/common
+++ b/src/share/common
@@ -20,9 +20,6 @@
SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
export SYSCONFIGDIR
-# monkeysphere version
-VERSION=0.23.1
-
# default log level
LOG_LEVEL="INFO"
@@ -41,6 +38,11 @@ PROMPT="true"
########################################################################
### UTILITY FUNCTIONS
+# output version info
+version() {
+ cat "${SYSSHAREDIR}/VERSION"
+}
+
# failure function. exits with code 255, unless specified otherwise.
failure() {
[ "$1" ] && echo "$1" >&2