Commit 930b5bfd authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix ALT 4.0/4.1 detection

parent 97830493
...@@ -15,7 +15,7 @@ is_alt() ...@@ -15,7 +15,7 @@ is_alt()
set_target_type() set_target_type()
{ {
# check for M51 and so on # check for M51 and so on
if echo $1 | grep "^M[0-9][0-9].$" >/dev/null ; then if echo $1 | egrep -q "^M[0-9][0-9].?$" ; then
MENV=$1 MENV=$1
return 0 return 0
fi fi
...@@ -32,7 +32,7 @@ set_target_type() ...@@ -32,7 +32,7 @@ set_target_type()
get_type_by_git_branch_name() get_type_by_git_branch_name()
{ {
# like p5 # like p5
if echo $1 | grep -q "^[pt][0-9]$" ; then if echo $1 | egrep -q "^[pt][0-9].?$" ; then
get_altdistr_mod $1 get_altdistr_mod $1
return return
fi fi
...@@ -44,7 +44,7 @@ get_type_by_git_branch_name() ...@@ -44,7 +44,7 @@ get_type_by_git_branch_name()
fi fi
# like M50P or M41 # like M50P or M41
if echo $1 | grep -q "^M[0-9][0-9].$" ; then if echo $1 | egrep -q "^M[0-9][0-9].?$" ; then
echo $1 echo $1
return return
fi fi
......
...@@ -13,7 +13,7 @@ echo "Current git branch: $(get_current_branch)" ...@@ -13,7 +13,7 @@ echo "Current git branch: $(get_current_branch)"
check 1 M40 $(get_type_by_git_branch_name 4.0) check 1 M40 $(get_type_by_git_branch_name 4.0)
check 1 M40 $(get_type_by_git_branch_name M40) check 1 M40 $(get_type_by_git_branch_name M40)
check 1 M50 $(get_type_by_git_branch_name p5) check 1 M50P $(get_type_by_git_branch_name p5)
check 1 M50 $(get_type_by_git_branch_name M50) check 1 M50 $(get_type_by_git_branch_name M50)
check 1 M50 $(get_type_by_git_branch_name 5.0) check 1 M50 $(get_type_by_git_branch_name 5.0)
check 1 M51 $(get_type_by_git_branch_name M51) check 1 M51 $(get_type_by_git_branch_name M51)
......
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
load_mod spec
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$3' do not match with '$2'" || echo "OK for '$1' with '$3'"
}
check_AD()
{
MENV='undetected'
set_target_type $1
check $1 $2 $MENV
}
check_AD M40 M40
check_AD M30 M30
check_AD M41 M41
check_AD M50P M50P
check_AD M60T M60T
check_AD M51 M51
check_AD E51 SS
check_AD SS SS
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