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

Unified Diff: src/scripts/enter_chroot.sh

Issue 605016: enter_chroot: bind mount depot_tools if present outside chroot. (Closed)
Patch Set: Created 10 years, 10 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: src/scripts/enter_chroot.sh
diff --git a/src/scripts/enter_chroot.sh b/src/scripts/enter_chroot.sh
index ab5418e6ccb749551a9b61a19a183553d0bd2195..89f29328b1d8e6f85e816b66a0ef00885ca4c726 100755
--- a/src/scripts/enter_chroot.sh
+++ b/src/scripts/enter_chroot.sh
@@ -63,6 +63,7 @@ set -e
INNER_CHROME_ROOT="/home/$USER/chrome_root" # inside chroot
CHROME_ROOT_CONFIG="/var/cache/chrome_root" # inside chroot
+INNER_DEPOT_TOOLS_ROOT="/home/$USER/depot_tools" # inside chroot
sudo chmod 0777 "$FLAGS_chroot/var/lock"
@@ -113,6 +114,17 @@ function setup_env {
sudo mount --bind "$CHROME_ROOT" "$MOUNTED_PATH"
fi
fi
+
+ MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}${INNER_DEPOT_TOOLS_ROOT}")"
+ if [ -z "$(mount | grep -F "on $MOUNTED_PATH")" ]
+ then
+ if [ $(which gclient 2>/dev/null) ]; then
+ echo "Mounting depot_tools"
+ DEPOT_TOOLS=$(dirname $(which gclient) )
+ mkdir -p "$MOUNTED_PATH"
+ sudo mount --bind "$DEPOT_TOOLS" "$MOUNTED_PATH"
+ fi
+ fi
) 200>>"$LOCKFILE"
}
« 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