diff --git a/build_packages b/build_packages index e4fb387690..a8dd6ced6d 100755 --- a/build_packages +++ b/build_packages @@ -9,25 +9,7 @@ # binary packages as a side-effect. The output packages will be picked up # by the build_image script to put together a bootable Chrome OS image. -# Load common CrOS utilities. Inside the chroot this file is installed in -# /usr/lib/crosutils. Outside the chroot we find it relative to the script's -# location. -find_common_sh() { - local common_paths=(/usr/lib/crosutils $(dirname "$0")) - local path - - SCRIPT_ROOT= - for path in "${common_paths[@]}"; do - local common="${path}/common.sh" - if ([ -r "${common}" ] && . "${common}" && [ -d "${SCRIPTS_DIR}" ]); then - SCRIPT_ROOT=${path} - break - fi - done -} - -find_common_sh -. "${SCRIPT_ROOT}/common.sh" || ! echo "Unable to load common.sh" || exit 1 +. "$(dirname "$0")/common.sh" || exit 1 # Script must run inside the chroot restart_in_chroot_if_needed "$@" diff --git a/setup_board b/setup_board index 6949a01aa0..b69b0dfd5e 100755 --- a/setup_board +++ b/setup_board @@ -6,25 +6,7 @@ # This script sets up a the sysroot for a particular target board. -# Load common CrOS utilities. Inside the chroot this file is installed in -# /usr/lib/crosutils. Outside the chroot we find it relative to the script's -# location. -find_common_sh() { - local common_paths=(/usr/lib/crosutils $(dirname "$0")) - local path - - SCRIPT_ROOT= - for path in "${common_paths[@]}"; do - local common="${path}/common.sh" - if ([ -r "${common}" ] && . "${common}" && [ -d "${SCRIPTS_DIR}" ]); then - SCRIPT_ROOT=${path} - break - fi - done -} - -find_common_sh -. "${SCRIPT_ROOT}/common.sh" || ! echo "Unable to load common.sh" || exit 1 +. "$(dirname "$0")/common.sh" || exit 1 . "${SRC_ROOT}/platform/dev/toolchain_utils.sh" # Script must run inside the chroot diff --git a/update_chroot b/update_chroot index b0825391b3..bfc241c5a6 100755 --- a/update_chroot +++ b/update_chroot @@ -6,10 +6,7 @@ # Performs an update of the chroot. -# Load common CrOS utilities. Inside the chroot this file is installed in -# /usr/lib/crosutils. Outside the chroot we find it relative to the script's -# location. -. "$(dirname $0)/common.sh" || { echo "Unable to load common.sh"; exit 1; } +. "$(dirname "$0")/common.sh" || exit 1 # Script must run inside the chroot assert_inside_chroot "$@"