add arguments to support customized working dir
This commit is contained in:
@@ -4,23 +4,30 @@
|
||||
# 2. cp local_manifest folder to new directory's .repo/
|
||||
# 3. enter new directory and repo sync [expect] wait success
|
||||
# 4. cros_sdk --no-ns-pid to enter chroot [expect] enter password
|
||||
set user_password [lindex $argv 0]
|
||||
set working_dir [lindex $argv 1]
|
||||
set num_arg [llength $argv]
|
||||
puts "INFO: Total: $num_arg argument(s)"
|
||||
|
||||
# set password [lindex $argv 0 ] # password
|
||||
# set build_image [lindex $argv 1 ] # 接收第2個引數,作為userid
|
||||
if { ${num_arg} ne 2} {
|
||||
puts "ERROR: not enough argument passed"
|
||||
puts "ERROR: usage: ./main_cros_reposync_build.sh {user_password} {working_directory}"
|
||||
return 0
|
||||
}
|
||||
set timeout -1
|
||||
|
||||
spawn ./cros_repoinit.sh
|
||||
spawn ./cros_repoinit.sh ${working_dir}
|
||||
expect "repo has been initialized"
|
||||
|
||||
spawn ./cros_cp_localmanifest.sh
|
||||
spawn ./cros_cp_localmanifest.sh ${working_dir}
|
||||
expect "local_manifests"
|
||||
|
||||
spawn ./cros_reposync.sh
|
||||
spawn ./cros_reposync.sh ${working_dir}
|
||||
expect "repo sync has finished successfully"
|
||||
|
||||
spawn ./cros_enter_sdk.sh
|
||||
expect "password"
|
||||
send "casper\r"
|
||||
send "${user_password :: -1}\r"
|
||||
|
||||
expect "(cr)"
|
||||
send "setup_board --board=volteer --profile=eldrid --force | tee daily_setup_board.log\r"
|
||||
|
||||
Reference in New Issue
Block a user