Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: enter_chroot.sh

Issue 3249008: Copying .subversion directory into the chroot, (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: fixed code review comments. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: enter_chroot.sh
diff --git a/enter_chroot.sh b/enter_chroot.sh
index f8dcd1d2df7ea50eb1b3c28b40f759f54a1451ca..663b76c9e3905e1e54fe6d32c640d8e50ca93c20 100755
--- a/enter_chroot.sh
+++ b/enter_chroot.sh
@@ -259,6 +259,16 @@ setup_env
# Use git:8 chars of sha1
REVISION=$(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
+ echo "mounting ~/.subversion into chroot"
+ MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}/home/${USER}/.subversion")"
+ if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]; then
+ mkdir -p "$MOUNTED_PATH"
+ sudo mount --bind "$HOME/.subversion" "$MOUNTED_PATH" || \
+ die "Could not mount $MOUNTED_PATH"
+ fi
+fi
# Run command or interactive shell. Also include the non-chrooted path to
# the source trunk for scripts that may need to print it (e.g.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698