Commit 89794c9a authored by Vitaly Lipatov's avatar Vitaly Lipatov

add some asserts for non empty MENV

parent f4148eff
...@@ -15,8 +15,8 @@ is_alt() ...@@ -15,8 +15,8 @@ is_alt()
set_target_type() set_target_type()
{ {
# check for M51 and so on # check for M51 and so on
if echo $1 | egrep -q "^M[0-9][0-9].?$" ; then if echo "$1" | egrep -q "^M[0-9][0-9].?$" ; then
MENV=$1 MENV="$1"
return 0 return 0
fi fi
case "$1" in case "$1" in
...@@ -48,6 +48,7 @@ get_type_by_git_branch_name() ...@@ -48,6 +48,7 @@ get_type_by_git_branch_name()
echo $1 echo $1
return return
fi fi
# it is ok to do nothing here
} }
get_type_by_current_branch() get_type_by_current_branch()
...@@ -94,7 +95,7 @@ get_altdistr_mod() ...@@ -94,7 +95,7 @@ get_altdistr_mod()
# Проверяем, соответствует ли релиз пакетов указанному в MENV # Проверяем, соответствует ли релиз пакетов указанному в MENV
pkg_release_check() pkg_release_check()
{ {
# assert MENV assert_var MENV
local STREL=$(get_default_txtrelease) local STREL=$(get_default_txtrelease)
# support alt in any case # support alt in any case
local STRELDEF=alt local STRELDEF=alt
......
...@@ -357,6 +357,7 @@ set_target_pkg_env() ...@@ -357,6 +357,7 @@ set_target_pkg_env()
PKGVENDOR=$($DISTRVENDOR -s "$DISTRNAME") PKGVENDOR=$($DISTRVENDOR -s "$DISTRNAME")
RPMVENDOR=$($DISTRVENDOR -n "$DISTRNAME") RPMVENDOR=$($DISTRVENDOR -n "$DISTRNAME")
[ -n "$MENV" ] || MENV="$(get_altdistr_mod "$DISTRVERSION")" [ -n "$MENV" ] || MENV="$(get_altdistr_mod "$DISTRVERSION")"
assert_var MENV
} }
# We believe that follow vars correctly in any way: # We believe that follow vars correctly in any way:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment