#!/bin/sh
# login to chroot to update original tree (not the COW copy)
DIST=$1
ARCH=$2
COW="/var/cache/pbuilder"
if [ "$DIST" = "" ] || [ "$DIST" = "sid" ] ; then
    COW="${COW}/base"
else
    COW="${COW}/${DIST}"
fi
if [ "$ARCH" = "" ] || [ "$ARCH" = "amd64" ] ; then
    COW="${COW}.cow"
else
    COW="${COW}-${ARCH}.cow"
fi
echo "login to $COW (overwrite non-COW mode)"
sudo pbuilder --login --no-targz --buildplace $COW


