Browse Source

Add arguments to show version

Alois Mahdal 7 years ago
parent
commit
4b54ae5c9b
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      src/imapdomo.skel

+ 12
- 0
src/imapdomo.skel View File

47
     echo -n "  -c $IMAPDOMO_HOME/main.lua"
47
     echo -n "  -c $IMAPDOMO_HOME/main.lua"
48
 }
48
 }
49
 
49
 
50
+show_version() {
51
+    echo '__MKIT_PROJ_NAME__ (__MKIT_PROJ_TAGLINE__) __MKIT_PROJ_VERSION__'
52
+    exit 0
53
+}
54
+
55
+show_semversion() {
56
+    echo '__MKIT_PROJ_VERSION__'
57
+    exit 0
58
+}
59
+
50
 main() {
60
 main() {
51
     local Action    # what to do
61
     local Action    # what to do
52
     local Debug     # true if debugging
62
     local Debug     # true if debugging
63
     while true; do case $1 in
73
     while true; do case $1 in
64
         -c) CdTo="$2"; shift 2 || usage ;;
74
         -c) CdTo="$2"; shift 2 || usage ;;
65
         -d) Debug=true; PRETTY_DEBUG=true; shift ;;
75
         -d) Debug=true; PRETTY_DEBUG=true; shift ;;
76
+        -V|--version-semver) show_semversion ;;
77
+        --version) show_version ;;
66
         -*) usage ;;
78
         -*) usage ;;
67
         *)  break ;;
79
         *)  break ;;
68
     esac done
80
     esac done