1 |
commit: 2e2ec27b96c6b70e3e811222dc317283752884ea |
2 |
Author: Christoph Mende <angelos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 08:37:51 2011 +0000 |
4 |
Commit: Christoph Mende <angelos <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 08:37:51 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/angelos.git;a=commit;h=2e2ec27b |
7 |
|
8 |
Get paths via portageq |
9 |
|
10 |
--- |
11 |
scripts/mount-chroot.sh | 10 +++++++--- |
12 |
1 files changed, 7 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/scripts/mount-chroot.sh b/scripts/mount-chroot.sh |
15 |
index 3286359..be97aaa 100755 |
16 |
--- a/scripts/mount-chroot.sh |
17 |
+++ b/scripts/mount-chroot.sh |
18 |
@@ -14,14 +14,18 @@ if [ ! -d "$@"/dev ]; then |
19 |
exit 1 |
20 |
fi |
21 |
|
22 |
+PORTDIR="$(portageq portdir)" |
23 |
+DISTDIR="$(portageq envvar DISTDIR)" |
24 |
+PKGDIR="$(portageq envvar PKGDIR)" |
25 |
+ |
26 |
mount --bind /dev "$@"/dev |
27 |
mount --bind /dev/pts "$@"/dev/pts |
28 |
mount --bind /sys "$@"/sys |
29 |
mkdir -p "$@"/usr/portage |
30 |
-mount --bind /home/angelos/gentoo-x86 "$@"/usr/portage |
31 |
+mount --bind "${PORTDIR}" "$@"/usr/portage |
32 |
mkdir -p "$@"/root/{packages,distfiles} |
33 |
-mount --bind /home/angelos/distfiles "$@"/root/distfiles |
34 |
-mount --bind /home/angelos/packages "$@"/root/packages |
35 |
+mount --bind "${DISTDIR}" "$@"/root/distfiles |
36 |
+mount --bind "${PKGDIR}" "$@"/root/packages |
37 |
mount -t proc none "$@"/proc |
38 |
cp /etc/resolv.conf "$@"/etc |