fix working dir location
This commit is contained in:
@@ -2,14 +2,22 @@
|
|||||||
#
|
#
|
||||||
# enter working directory
|
# enter working directory
|
||||||
#
|
#
|
||||||
|
|
||||||
|
_mydir="$(pwd)"
|
||||||
|
SCRIPT_DIR=$_mydir
|
||||||
|
|
||||||
_working_dir_name=$1
|
_working_dir_name=$1
|
||||||
_working_dir_name=${_working_dir_name::-1}
|
if [ ${_working_dir_name: -1} = " " ]; then
|
||||||
|
#somehow there's a space char when expect argument
|
||||||
|
_working_dir_name=${_working_dir_name::-1}
|
||||||
|
fi
|
||||||
|
|
||||||
_mydir="$(pwd)"
|
_mydir="$(pwd)"
|
||||||
_parentdir="$(dirname "$_mydir")"
|
_parentdir="$(dirname "$_mydir")"
|
||||||
_working_full_path="${_parentdir}/${_working_dir_name}"
|
_working_full_path="${_parentdir}/${_working_dir_name}"
|
||||||
cd ${_working_full_path}
|
cd ${_working_full_path}
|
||||||
echo "working path ${_working_full_path}"
|
echo "working path ${_working_full_path}"
|
||||||
|
|
||||||
cp -R ${SCRIPT_DIR}/local_manifests ${WORKING_DIR}/.repo
|
cp -R ${SCRIPT_DIR}/local_manifests ${_working_full_path}/.repo
|
||||||
ls ${WORKING_DIR}/.repo
|
ls ${_working_full_path}/.repo
|
||||||
ls ${WORKING_DIR}/.repo/local_manifests
|
ls ${_working_full_path}/.repo/local_manifests
|
||||||
|
|||||||
15
cros_cp_utilities.sh
Executable file
15
cros_cp_utilities.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# enter working directory
|
||||||
|
#
|
||||||
|
_working_dir_name=$1
|
||||||
|
_working_dir_name=${_working_dir_name::-1}
|
||||||
|
_mydir="$(pwd)"
|
||||||
|
_parentdir="$(dirname "$_mydir")"
|
||||||
|
_working_full_path="${_parentdir}/${_working_dir_name}"
|
||||||
|
cd ${_working_full_path}
|
||||||
|
echo "working path ${_working_full_path}"
|
||||||
|
|
||||||
|
cp -R ${SCRIPT_DIR}/local_manifests ${WORKING_DIR}/.repo
|
||||||
|
ls ${WORKING_DIR}/.repo
|
||||||
|
ls ${WORKING_DIR}/.repo/local_manifests
|
||||||
@@ -3,7 +3,12 @@
|
|||||||
# Create working directory
|
# Create working directory
|
||||||
#
|
#
|
||||||
_working_dir_name=$1
|
_working_dir_name=$1
|
||||||
_working_dir_name=${_working_dir_name::-1}
|
|
||||||
|
if [ ${_working_dir_name: -1} = " " ]; then
|
||||||
|
#somehow there's a space char when expect argument
|
||||||
|
_working_dir_name=${_working_dir_name::-1}
|
||||||
|
fi
|
||||||
|
|
||||||
_working_full_path="${_parentdir}/${_working_dir_name}"
|
_working_full_path="${_parentdir}/${_working_dir_name}"
|
||||||
cd ${_working_full_path}
|
cd ${_working_full_path}
|
||||||
echo "GOTO: ${_working_full_path}"
|
echo "GOTO: ${_working_full_path}"
|
||||||
|
|||||||
@@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Create working directory
|
# Create working directory
|
||||||
# somehow there's a space char when expect argument
|
|
||||||
_working_dir_name=$1
|
_working_dir_name=$1
|
||||||
_working_dir_name=${_working_dir_name::-1}
|
|
||||||
|
if [ ${_working_dir_name: -1} = " " ]; then
|
||||||
|
#somehow there's a space char when expect argument
|
||||||
|
_working_dir_name=${_working_dir_name::-1}
|
||||||
|
fi
|
||||||
|
|
||||||
_mydir="$(pwd)"
|
_mydir="$(pwd)"
|
||||||
_parentdir="$(dirname "$_mydir")"
|
_parentdir="$(dirname "$_mydir")"
|
||||||
|
|||||||
@@ -3,8 +3,14 @@
|
|||||||
#
|
#
|
||||||
# enter working directory
|
# enter working directory
|
||||||
#
|
#
|
||||||
|
|
||||||
_working_dir_name=$1
|
_working_dir_name=$1
|
||||||
_working_dir_name=${_working_dir_name::-1}
|
|
||||||
|
if [ ${_working_dir_name: -1} = " " ]; then
|
||||||
|
#somehow there's a space char when expect argument
|
||||||
|
_working_dir_name=${_working_dir_name::-1}
|
||||||
|
fi
|
||||||
|
|
||||||
_mydir="$(pwd)"
|
_mydir="$(pwd)"
|
||||||
_parentdir="$(dirname "$_mydir")"
|
_parentdir="$(dirname "$_mydir")"
|
||||||
_working_full_path="${_parentdir}/${_working_dir_name}"
|
_working_full_path="${_parentdir}/${_working_dir_name}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ expect "repo sync has finished successfully"
|
|||||||
|
|
||||||
spawn ./cros_enter_sdk.sh
|
spawn ./cros_enter_sdk.sh
|
||||||
expect "password"
|
expect "password"
|
||||||
send "${user_password :: -1}\r"
|
send "$user_password\r"
|
||||||
|
|
||||||
expect "(cr)"
|
expect "(cr)"
|
||||||
send "setup_board --board=volteer --profile=eldrid --force | tee daily_setup_board.log\r"
|
send "setup_board --board=volteer --profile=eldrid --force | tee daily_setup_board.log\r"
|
||||||
|
|||||||
Reference in New Issue
Block a user