Fix enter_chroot.sh so that it can be run from a cwd that is not in a git repository

BUG=none
TEST=run from within and without a repo

Change-Id: I00eb999974656450f6af24583ca2247805b5799e

Review URL: http://codereview.chromium.org/3529005
This commit is contained in:
David Rochberg 2010-10-04 09:44:57 -04:00
parent 4732d5d0c3
commit c1a3e56e23

View File

@ -272,7 +272,7 @@ setup_env
# hand-sync'd some subdirs and edited files in others.
# In that case, check against origin/HEAD and mark** revision.
# Use git:8 chars of sha1
REVISION=$(git rev-parse --short=8 HEAD)
REVISION=$(cd ${FLAGS_trunk}/src/scripts ; git rev-parse --short=8 HEAD)
CHROOT_PASSTHRU="CHROMEOS_REVISION=$REVISION BUILDBOT_BUILD=$FLAGS_build_number CHROMEOS_OFFICIAL=$CHROMEOS_OFFICIAL"
if [ -d "$HOME/.subversion" ]; then
# Bind mounting .subversion into chroot