blob: 0eab8abc25fc8e26c2f7ec87ce00f1208aaa1169 [file] [log] [blame]
b.liu575a0f12024-12-19 20:08:45 +08001#!/bin/bash
2
3current_branch=`cat ../scripts/current_branch`
4brance_right=0
5
6function help()
7{
8 echo "可用分支:"
9 for brance in $current_branch;
10 do
11 echo $brance
12 done
13}
14
15function brance_check()
16{
17 for brance in $current_branch;
18 do
19 if [ "$brance" == "$1" ];then
20 brance_right=1
21 fi
22 done
23}
24
25
26cd ..
27MBTK_SOURCE_DIR="mbtk_source"
28ASR_RLS_BRANCH=`git branch | grep "*" | cut -d " " -f 2`
29cd $MBTK_SOURCE_DIR
30
31if [ -n "$1" ] ;then
32 brance_check $1
33 if [ $brance_right -eq 1 ]; then
34 #if [ ! $1 in $current_branch ];then
35 echo "Brance : $1"
36 ASR_CUSTOM_BRANCH=$1
37 else
38 help
39 exit 1
40 fi
41else
42 help
43 exit 1
44fi
45
46CONFIG_FILE_NAME=config-$ASR_RLS_BRANCH-$ASR_CUSTOM_BRANCH
47if [ -f configs/$CONFIG_FILE_NAME ];then
48 cp -f configs/$CONFIG_FILE_NAME config
49 ./build.sh clean
50 echo "Use config file : $CONFIG_FILE_NAME"
51 cat config | grep =
52else
53 echo "No found config file : $CONFIG_FILE_NAME"
54fi
55