]> git.wh0rd.org Git - home.git/commitdiff
mount /usr/local/src if it exists
authorMike Frysinger <vapier@gentoo.org>
Wed, 26 Dec 2012 19:04:34 +0000 (14:04 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 26 Dec 2012 19:04:34 +0000 (14:04 -0500)
.bin/custom-chroot

index dcaeabc6bf03f25157efa62e16aaa57773174bc1..878a8ff813a47c7d83790adacbac6de9d3cd4aba 100755 (executable)
@@ -12,7 +12,7 @@ else
 fi
 unset UNSHARE
 
-mounts="proc sys tmp dev dev/pts usr/portage usr/portage/distfiles"
+mounts="proc sys tmp dev dev/pts usr/portage usr/portage/distfiles usr/local/src"
 
 chroot=${0%/*}
 case ${chroot} in
@@ -22,10 +22,10 @@ esac
 cd "${chroot}"
 
 do_umount() {
-       mounts=$(mount | grep ${chroot} | awk '{print $3}' | tac)
+       local m mounts=$(mount | grep ${chroot} | awk '{print $3}' | tac)
        for m in ${mounts} ; do
-               echo "unmounting $m"
-               umount $m
+               echo "unmounting ${m}"
+               umount "${m}"
        done
        if [[ -z ${mounts} ]] ; then
                echo "nothing mounted in ${chroot}"