summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2011-04-27 10:37:51 +0200
committerChristoph Mende <angelos@gentoo.org>2011-04-27 10:37:51 +0200
commit2e2ec27b96c6b70e3e811222dc317283752884ea (patch)
treeaeb108073f74a89694ae54bc8d9a1a38c685478c /scripts/mount-chroot.sh
parentscmpc: Install ChangeLog (diff)
downloadangelos-2e2ec27b96c6b70e3e811222dc317283752884ea.tar.gz
angelos-2e2ec27b96c6b70e3e811222dc317283752884ea.tar.bz2
angelos-2e2ec27b96c6b70e3e811222dc317283752884ea.zip
Get paths via portageq
Diffstat (limited to 'scripts/mount-chroot.sh')
-rwxr-xr-xscripts/mount-chroot.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/mount-chroot.sh b/scripts/mount-chroot.sh
index 3286359..be97aaa 100755
--- a/scripts/mount-chroot.sh
+++ b/scripts/mount-chroot.sh
@@ -14,14 +14,18 @@ if [ ! -d "$@"/dev ]; then
exit 1
fi
+PORTDIR="$(portageq portdir)"
+DISTDIR="$(portageq envvar DISTDIR)"
+PKGDIR="$(portageq envvar PKGDIR)"
+
mount --bind /dev "$@"/dev
mount --bind /dev/pts "$@"/dev/pts
mount --bind /sys "$@"/sys
mkdir -p "$@"/usr/portage
-mount --bind /home/angelos/gentoo-x86 "$@"/usr/portage
+mount --bind "${PORTDIR}" "$@"/usr/portage
mkdir -p "$@"/root/{packages,distfiles}
-mount --bind /home/angelos/distfiles "$@"/root/distfiles
-mount --bind /home/angelos/packages "$@"/root/packages
+mount --bind "${DISTDIR}" "$@"/root/distfiles
+mount --bind "${PKGDIR}" "$@"/root/packages
mount -t proc none "$@"/proc
cp /etc/resolv.conf "$@"/etc