X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dsa-metapackages.git;a=blobdiff_plain;f=apt-in-chroot;h=45c119752a330338e8f83babdc9c3c170cfb1249;hp=f1c720199c6ee674ff1798bf926e5ff07a5215b1;hb=021fb6caca85da5cb71cbc5f9dcd8d3121c6d904;hpb=a05dd9f1aa349a0d1164ca63453b18c81cdb973b diff --git a/apt-in-chroot b/apt-in-chroot index f1c7201..45c1197 100755 --- a/apt-in-chroot +++ b/apt-in-chroot @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # apt-in-chroot - runs apt in a specified chroot # @@ -57,11 +57,7 @@ install|remove|purge|build-dep) ;; esac -grep -qFx $CHROOT <<< "$VALID_CHROOTS" - -RET=$? - -if [ "$RET" == "0" ]; then +if echo "$VALID_CHROOTS" | grep -qFx "$CHROOT"; then # valid chroot echo "Will run '/usr/sbin/chroot $CHROOT_DIR/$CHROOT apt-get $APTCMD $PACKAGES'" /usr/sbin/chroot $CHROOT_DIR/$CHROOT apt-get $APTCMD $PACKAGES