From 7d08493b258c397646ba0fe06bcb8e48a32a9205 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 27 May 2013 11:11:02 +0200 Subject: ch: update for changes in devtools 20130525 Signed-off-by: Florian Pritz --- ch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ch') diff --git a/ch b/ch index a0b0c77..04bb6d5 100755 --- a/ch +++ b/ch @@ -27,6 +27,7 @@ __chrootalias() { chroot_arch="" arg_arch=${1%%+*} arg_copy="$USER+$1" + arg_copy=${arg_copy//+/-} case $arg_arch in 32*) @@ -95,14 +96,13 @@ chkill() { chshell() { __chrootalias "$1" || return [ -d "$copydir" ] || __genchroot - linux${chroot_arch} sudo mkarchroot -r "${2:-/bin/bash}" "$copydir" + sudo arch-nspawn "$copydir" "${2:-/bin/bash}" "${@:3}" } chbuild() { - chrootalias="$1"; shift - __chrootalias "$chrootalias" || return - linux${chroot_arch} sudo makechrootpkg -l "${copydir##*/}" -r "$chrootdir" -n -- -f "$@" - chshell "$chrootalias" "pacman --noconfirm -Rcs namcap" + __chrootalias "$1" || return + linux${chroot_arch} sudo makechrootpkg -l "${copydir##*/}" -r "$chrootdir" -n -- -f "${@:2}" + chshell "$1" pacman --noconfirm -Rcs namcap } chinstall() { @@ -128,13 +128,13 @@ chclean() { chrshell() { __chrootalias $1 || return - linux${chroot_arch} sudo mkarchroot -r ${2:-bash} "$chrootdir/root" + sudo arch-nspawn "$chrootdir/root" "${2:-/bin/bash}" "${@:3}" } chupdate() { __chrootalias $1 || return echo ":: Updating $chroot" - linux${chroot_arch} sudo mkarchroot -u "$chrootdir/root" -- --noconfirm + sudo arch-nspawn "$chrootdir/root" pacman -Syu --noconfirm echo ":: Cleaning up ..." chclean $1 } @@ -178,8 +178,8 @@ case $command in chkill $arg done ;; - shell) chshell "$1";; - rshell) chrshell "$1";; + shell) chshell "$@";; + rshell) chrshell "$@";; install) chinstall "$@";; list) for chrootdir in "$CHROOTS/"*/; do -- cgit v1.2.3-24-g4f1b