mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
Clean up sdk_lib/enter_chroot.sh startup boilerplate.
BUG=None TEST=run cros_sdk Change-Id: I39fafd58c7cc9fd536fe9b75f314f9970766a483 Reviewed-on: http://gerrit.chromium.org/gerrit/6414 Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
cc6d2e7f85
commit
8e6750dee7
@ -6,15 +6,8 @@
|
|||||||
|
|
||||||
# Script to enter the chroot environment
|
# Script to enter the chroot environment
|
||||||
|
|
||||||
# The script lives in scripts/ or scripts/sdk_lib/
|
SCRIPT_ROOT=$(readlink -f $(dirname "$0")/..)
|
||||||
for path in "$(dirname $0)" "$(dirname $0)/../"; do
|
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
||||||
if [ -r "${path}/common.sh" ]; then
|
|
||||||
SCRIPT_ROOT=${path}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
. "${SCRIPT_ROOT}/common.sh" || { echo "Unable to load common.sh"; exit 1; }
|
|
||||||
|
|
||||||
# Script must be run outside the chroot and as a regular user.
|
# Script must be run outside the chroot and as a regular user.
|
||||||
assert_outside_chroot
|
assert_outside_chroot
|
||||||
|
Loading…
Reference in New Issue
Block a user