added version output option
authorJameson Graef Rollins <jrollins@finestructure.net>
Sun, 28 Dec 2008 22:09:44 +0000 (17:09 -0500)
committerJameson Graef Rollins <jrollins@finestructure.net>
Sun, 28 Dec 2008 22:09:44 +0000 (17:09 -0500)
Makefile
packaging/debian/changelog
src/common
src/monkeysphere
src/monkeysphere-server

index 7493b1f5112924e38f92e20094967ff6e8d41234..e40c4b18366bb374b690921707d6f9dcda8fc885 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ tarball: clean
 
 debian-package: tarball
        tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
+       sed -i "s|__VERSION__|$(MONKEYSPHERE_VERSION)|g" monkeysphere-$(MONKEYSPHERE_VERSION)/src/common
        cp -a packaging/debian monkeysphere-$(MONKEYSPHERE_VERSION)
        (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us)
        rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
index 55f0aaf936f2a67c42960f95c24d4409bd07b953..45deaabebaf40064227984547eb6dc297d5e1083 100644 (file)
@@ -5,8 +5,9 @@ monkeysphere (0.23~pre-1) UNRELEASED; urgency=low
       functions that require it to be there.
     - add checks for root users, for functions where it is required.
     - get rid of getopts.
+    - added version output option
 
- -- Jameson Graef Rollins <jrollins@finestructure.net>  Tue, 16 Dec 2008 15:26:53 -0500
+ -- Jameson Graef Rollins <jrollins@finestructure.net>  Sun, 28 Dec 2008 15:54:21 -0500
 
 monkeysphere (0.22-1) unstable; urgency=low
 
index f6000d31d223d9245c967d6bc0324575cc84a1ca..eb3a08343819bcec665b8387e950f661984086a5 100644 (file)
@@ -19,6 +19,9 @@
 SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
 export SYSCONFIGDIR
 
+# monkeysphere version
+VERSION=__VERSION__
+
 ########################################################################
 ### UTILITY FUNCTIONS
 
index c00370640356edcbfd859dfed2e7057b339b9ca5..98531d20ef677e6e9efdda48aea04c07051b617c 100755 (executable)
@@ -45,6 +45,7 @@ subcommands:
    --length (-l) BITS                  key length in bits (2048)
    --expire (-e) EXPIRE                date to expire
  subkey-to-ssh-agent (s)             store authentication subkey in ssh-agent
+ version (v)                         show version number
  help (h,?)                          this help
 
 EOF
@@ -365,6 +366,10 @@ case $COMMAND in
        subkey_to_ssh_agent "$@"
        ;;
 
+    'version'|'v')
+       echo "$VERSION"
+       ;;
+
     '--help'|'help'|'-h'|'h'|'?')
         usage
         ;;
index 7d7578d58cc9918968c8c6e396f5bdf0c719fcd3..ba3fa8de409b350ca57e255045d52cf09446206e 100755 (executable)
@@ -66,6 +66,7 @@ subcommands:
 
  gpg-authentication-cmd CMD          gnupg-authentication command
 
+ version (v)                         show version number
  help (h,?)                          this help
 
 EOF
@@ -1066,6 +1067,10 @@ case $COMMAND in
        gpg_authentication_cmd "$@"
        ;;
 
+    'version'|'v')
+       echo "$VERSION"
+       ;;
+
     '--help'|'help'|'-h'|'h'|'?')
         usage
         ;;