add arguments to support customized working dir
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO: maybe to umount and remove old ToT?
|
||||
# Or `cros_sdk --delete` enough ?
|
||||
#
|
||||
# Create working directory
|
||||
# somehow there's a space char when expect argument
|
||||
_working_dir_name=$1
|
||||
_working_dir_name=${_working_dir_name::-1}
|
||||
|
||||
SCRIPT_DIR=${HOME}/chrome/daily_routine_repo
|
||||
WORKING_DIR=${HOME}/chrome/dailyBuildToT
|
||||
# WORKING_DIR=/home/casperchang/chrome/ToT
|
||||
_mydir="$(pwd)"
|
||||
_parentdir="$(dirname "$_mydir")"
|
||||
_working_full_path="${_parentdir}/${_working_dir_name}"
|
||||
_working_full_path=${_working_full_path// /}
|
||||
mkdir -p ${_working_full_path}
|
||||
cd ${_working_full_path}
|
||||
echo "INFO: Created new directory: ${_working_full_path}"
|
||||
|
||||
mkdir ${WORKING_DIR}
|
||||
cd ${WORKING_DIR}
|
||||
#
|
||||
# Do repo init
|
||||
#
|
||||
repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git
|
||||
|
||||
Reference in New Issue
Block a user