Browse Source

Add --version parameter

Alois Mahdal 10 years ago
parent
commit
3bb0c94283
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      bin/saturnin.skel

+ 7
- 0
bin/saturnin.skel View File

17
 SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
17
 SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
18
 export FFOO_CONFIG_PATH=$(mkinipath | tr '\n' :)
18
 export FFOO_CONFIG_PATH=$(mkinipath | tr '\n' :)
19
 export FFOO_CONFIG_SUFFIX=".ini"
19
 export FFOO_CONFIG_SUFFIX=".ini"
20
+export SATURNIN_VERSION="__VERSION__"
20
 
21
 
21
 ffoo import exit
22
 ffoo import exit
22
 ffoo import core
23
 ffoo import core
33
       | sed -e 's/saturnin-/    /'
34
       | sed -e 's/saturnin-/    /'
34
 }
35
 }
35
 
36
 
37
+version_info() {
38
+    echo "$(basename $0) (Smart and ready desktop helper) $SATURNIN_VERSION"
39
+    exit $FFOO_EXIT_OK
40
+}
41
+
36
 while true; do case $1 in
42
 while true; do case $1 in
37
     -d|--debug)     export FFOO_DEBUG=true; shift   ;;
43
     -d|--debug)     export FFOO_DEBUG=true; shift   ;;
38
     -v|--verbose)   export FFOO_VERBOSE=true; shift ;;
44
     -v|--verbose)   export FFOO_VERBOSE=true; shift ;;
45
+    --version)      version_info                    ;;
39
     -*)             usage;                          ;;
46
     -*)             usage;                          ;;
40
     --*)            usage;                          ;;
47
     --*)            usage;                          ;;
41
     --)             shift; break                    ;;
48
     --)             shift; break                    ;;