mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
Use common.sh from the source directory.
Update setup_board and build_packages to use common.sh from source directory, so that changes in common.sh show up immediately. BUG=chromium-os:27364 TEST=Run each script, testing that changes to common.sh are picked up. Change-Id: I6847bbf8c486d14c58dfcbb9361cd606c11c817b Reviewed-on: https://gerrit.chromium.org/gerrit/18245 Reviewed-by: David James <davidjames@chromium.org> Tested-by: David James <davidjames@chromium.org> Commit-Ready: David James <davidjames@chromium.org>
This commit is contained in:
parent
53d3680f54
commit
0b1baf6055
@ -9,25 +9,7 @@
|
|||||||
# binary packages as a side-effect. The output packages will be picked up
|
# 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.
|
# 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
|
. "$(dirname "$0")/common.sh" || exit 1
|
||||||
# /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
|
|
||||||
|
|
||||||
# Script must run inside the chroot
|
# Script must run inside the chroot
|
||||||
restart_in_chroot_if_needed "$@"
|
restart_in_chroot_if_needed "$@"
|
||||||
|
20
setup_board
20
setup_board
@ -6,25 +6,7 @@
|
|||||||
|
|
||||||
# This script sets up a the sysroot for a particular target board.
|
# This script sets up a the sysroot for a particular target board.
|
||||||
|
|
||||||
# Load common CrOS utilities. Inside the chroot this file is installed in
|
. "$(dirname "$0")/common.sh" || exit 1
|
||||||
# /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
|
|
||||||
. "${SRC_ROOT}/platform/dev/toolchain_utils.sh"
|
. "${SRC_ROOT}/platform/dev/toolchain_utils.sh"
|
||||||
|
|
||||||
# Script must run inside the chroot
|
# Script must run inside the chroot
|
||||||
|
@ -6,10 +6,7 @@
|
|||||||
|
|
||||||
# Performs an update of the chroot.
|
# Performs an update of the chroot.
|
||||||
|
|
||||||
# Load common CrOS utilities. Inside the chroot this file is installed in
|
. "$(dirname "$0")/common.sh" || exit 1
|
||||||
# /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; }
|
|
||||||
|
|
||||||
# Script must run inside the chroot
|
# Script must run inside the chroot
|
||||||
assert_inside_chroot "$@"
|
assert_inside_chroot "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user