blob: eb126d5ed252264112ab51c02f203f59ace892f0 [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
b.liu61ad9172025-01-09 14:33:55 +080047
48if [ ! -f configs/$CONFIG_FILE_NAME ];then
49 echo "No found config file : $CONFIG_FILE_NAME , use default config file."
50 CONFIG_FILE_NAME=config-default
51fi
52
b.liu575a0f12024-12-19 20:08:45 +080053if [ -f configs/$CONFIG_FILE_NAME ];then
54 cp -f configs/$CONFIG_FILE_NAME config
55 ./build.sh clean
56 echo "Use config file : $CONFIG_FILE_NAME"
57 cat config | grep =
58else
59 echo "No found config file : $CONFIG_FILE_NAME"
60fi
61