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,6 +47,16 @@ mkcmd() {
47 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 60
 main() {
51 61
     local Action    # what to do
52 62
     local Debug     # true if debugging
@@ -63,6 +73,8 @@ main() {
63 73
     while true; do case $1 in
64 74
         -c) CdTo="$2"; shift 2 || usage ;;
65 75
         -d) Debug=true; PRETTY_DEBUG=true; shift ;;
76
+        -V|--version-semver) show_semversion ;;
77
+        --version) show_version ;;
66 78
         -*) usage ;;
67 79
         *)  break ;;
68 80
     esac done