chiark / gitweb /
make apt-in-chroot work with dash
authorStephen Gran <steve@lobefin.net>
Sun, 5 Jun 2011 19:14:53 +0000 (20:14 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 5 Jun 2011 19:14:53 +0000 (20:14 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
apt-in-chroot

index 4e0028a6748bf5d09bd90f3f2ae1bea4269e34eb..21be495632c0fe00414b5f26ec657f2e799740b9 100755 (executable)
@@ -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"
        # 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