add branch config support
This commit is contained in:
@@ -16,6 +16,7 @@ if { ${num_arg} > 0} {
|
||||
|
||||
set user_password "default"
|
||||
set working_dir "default"
|
||||
set repo_branch "default"
|
||||
|
||||
set f [open "config.txt"]
|
||||
set configs [split [read $f] "\n"]
|
||||
@@ -40,6 +41,15 @@ foreach config $configs {
|
||||
puts "$key:$value"
|
||||
set working_dir $value
|
||||
}
|
||||
repo_branch {
|
||||
if { $value eq "default"} {
|
||||
puts "INFO: no branch specified, repo init main branch"
|
||||
set repo_branch ""
|
||||
} else {
|
||||
puts "$key:$value"
|
||||
set repo_branch $value
|
||||
}
|
||||
}
|
||||
# Add argument here
|
||||
default {
|
||||
puts "ERROR: Invalid argument $key"
|
||||
@@ -52,10 +62,10 @@ foreach config $configs {
|
||||
|
||||
set timeout -1
|
||||
|
||||
spawn ./cros_repoinit.sh ${working_dir}
|
||||
spawn ./cros_repoinit.sh ${working_dir} ${repo_branch}
|
||||
expect "repo has been initialized"
|
||||
|
||||
spawn ./cros_cp_localmanifest.sh ${working_dir}
|
||||
spawn ./cros_cp_localmanifest.sh ${working_dir} ${repo_branch}
|
||||
expect "local_manifests"
|
||||
|
||||
spawn ./cros_reposync.sh ${working_dir}
|
||||
@@ -63,7 +73,6 @@ expect "repo sync has finished successfully"
|
||||
|
||||
spawn ./cros_cp_utilities.sh ${working_dir}
|
||||
expect "dut_pty.sh"
|
||||
# todo: copy the utility scripts into src/script directory
|
||||
|
||||
spawn ./cros_enter_sdk.sh ${working_dir}
|
||||
expect "password"
|
||||
|
||||
Reference in New Issue
Block a user