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:
J. Richard Barnette 2011-08-22 12:35:52 -07:00 committed by Richard Barnette
parent cc6d2e7f85
commit 8e6750dee7

View File

@ -6,15 +6,8 @@
# Script to enter the chroot environment
# The script lives in scripts/ or scripts/sdk_lib/
for path in "$(dirname $0)" "$(dirname $0)/../"; do
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_ROOT=$(readlink -f $(dirname "$0")/..)
. "${SCRIPT_ROOT}/common.sh" || exit 1
# Script must be run outside the chroot and as a regular user.
assert_outside_chroot