summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-08-14 15:05:29 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-14 15:05:29 +0200
commite8df407a2580661654f79b7ade5d89853bef7e7d (patch)
tree87130f488e3a3c775722d390d0aecd7db372dd3d /.zshrc
parent2c4aa9ab31ee75f1e186877bf74a0620f7824891 (diff)
downloaddotfiles-e8df407a2580661654f79b7ade5d89853bef7e7d.tar.gz
dotfiles-e8df407a2580661654f79b7ade5d89853bef7e7d.tar.xz
zshrc: fix chroot creation and add function to create new ones
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc12
1 files changed, 11 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 4dc9fb5..7f71f86 100644
--- a/.zshrc
+++ b/.zshrc
@@ -460,11 +460,21 @@ __chrootalias() {
multilib*) chroot_cmd=${chroot%%-x86_64};;
*) chroot_cmd=$chroot;;
esac
- sudo ${chroot_cmd}-build -r "$__CHROOTS" || true
+ (
+ unfunction chpwd
+ cd /
+ sudo ${chroot_cmd}-build -r "$__CHROOTS" || true
+ )
fi
}
+chcreate() {
+ for i in $@; do
+ __chrootalias $i || return
+ done
+}
+
chkill() {
if [[ $1 = all ]]; then
for chrootdir in "$__CHROOTS/"*(/); do