summaryrefslogtreecommitdiffstats
path: root/FUNCTIONS
diff options
context:
space:
mode:
authorPol Vinogradov2014-07-04 00:21:51 -0400
committerPol Vinogradov2014-07-04 00:21:51 -0400
commit2bce02ea2705c165468dccb647a60400e2be8f6b (patch)
treed42e3d8be21e9ec8be0d54454e73ea44a22cd8a1 /FUNCTIONS
parent132363d653976f6a21006996d41d91ef902ce85f (diff)
FUNCTIONS: more fixes in get_scm_version
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-xFUNCTIONS12
1 files changed, 7 insertions, 5 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index 78cc04857d..4ca45106c8 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -667,13 +667,15 @@ function get_up_spell_name() {
#---
function get_scm_version() {
local spell=$(get_up_spell_name) &&
- local spell_branch=${"$spell"_BRANCH} &&
- local spell_autoupdate=${"$spell"_AUTOUPDATE} &&
- echo "${!$spell_branch:-scm}$(
- [[ "${!$spell_autoupdate}" = y ]] && date "+-%Y%m%d")"
+ local spell_branch="${spell}_BRANCH" &&
+ local spell_autoupdate="${spell}_AUTOUPDATE" &&
+ if [ "${!spell_autoupdate}" = "y" ]; then
+ echo $(date "+%Y%m%d")
+ else
+ echo ${!spell_branch:-scm}
+ fi
}
-
# Move SPELL_OPTS to OPTS
# basicly generic OPTS="$SPELL_OPTS $OPTS"
function prepare_opts() {