mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-20 18:12:01 +01:00
Copying .subversion directory into the chroot,
so that the original users' subversion access permissions are preserved inside the chroot Change-Id: I486070b3c1a2dda169ae0a95982ba693574e001b BUG= TEST= Review URL: http://codereview.chromium.org/3249008
This commit is contained in:
parent
1703423a77
commit
32759cfe68
@ -259,6 +259,16 @@ setup_env
|
|||||||
# Use git:8 chars of sha1
|
# Use git:8 chars of sha1
|
||||||
REVISION=$(git rev-parse --short=8 HEAD)
|
REVISION=$(git rev-parse --short=8 HEAD)
|
||||||
CHROOT_PASSTHRU="CHROMEOS_REVISION=$REVISION BUILDBOT_BUILD=$FLAGS_build_number CHROMEOS_OFFICIAL=$CHROMEOS_OFFICIAL"
|
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
|
# 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.
|
# the source trunk for scripts that may need to print it (e.g.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user