Browse Source

Add optional codename to version info

Alois Mahdal 8 years ago
parent
commit
66c6c62c54
2 changed files with 4 additions and 1 deletions
  1. 1
    0
      src/bin/satcmd.skel
  2. 3
    1
      src/shellfu/saturnin.sh

+ 1
- 0
src/bin/satcmd.skel View File

@@ -25,6 +25,7 @@ SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
25 25
 SATURNIN_LIBEXEC_PREFIX="satcmd-"
26 26
 SATURNIN_APP_VERSION="__MKIT_PROJ_VERSION__"
27 27
 SATURNIN_APP_TAGLINE="__MKIT_PROJ_TAGLINE__"
28
+SATURNIN_APP_CODENAME="__MKIT_PROJ_CODENAME__"
28 29
 
29 30
 #
30 31
 # =====END BUILT PART=====

+ 3
- 1
src/shellfu/saturnin.sh View File

@@ -73,7 +73,9 @@ saturnin__version() {
73 73
     # Print version info
74 74
     #
75 75
     local tagline=${SATURNIN_APP_TAGLINE:-Some app with default tagline}
76
-    echo "$(basename "$0") ($tagline) $SATURNIN_APP_VERSION"
76
+    local maybe_codename=""
77
+    test -n "$SATURNIN_APP_CODENAME" && maybe_codename=" - $SATURNIN_APP_CODENAME"
78
+    echo "$(basename "$0") ($tagline) $SATURNIN_APP_VERSION$maybe_codename"
77 79
     return "$SHELLFU_EXIT_OK"
78 80
 }
79 81