mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
enter_chroot: bind mount depot_tools if present outside chroot.
Another CL is coming to automatically add depot_tools to the PATH inside the chroot. It's in a different repo. Review URL: http://codereview.chromium.org/605016
This commit is contained in:
parent
6d0ca16277
commit
5d0248feb8
@ -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"
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user