diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/monkeysphere | 2 | ||||
-rwxr-xr-x | src/monkeysphere-authentication | 2 | ||||
-rwxr-xr-x | src/monkeysphere-host | 2 | ||||
-rw-r--r-- | src/share/common | 8 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/monkeysphere b/src/monkeysphere index 371983f..6db4827 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -239,7 +239,7 @@ case $COMMAND in ;; 'version'|'v') - echo "$VERSION" + version ;; '--help'|'help'|'-h'|'h'|'?') diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication index 497470d..c009653 100755 --- a/src/monkeysphere-authentication +++ b/src/monkeysphere-authentication @@ -199,7 +199,7 @@ case $COMMAND in ;; 'version'|'v') - echo "$VERSION" + version ;; '--help'|'help'|'-h'|'h'|'?') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 1b0de0c..c454354 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -315,7 +315,7 @@ case $COMMAND in ;; 'version'|'v') - echo "$VERSION" + version ;; '--help'|'help'|'-h'|'h'|'?') 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 |