#!/bin/sh
dobullseye="yes"
rm -f .pbuilderrc
echo "------------------ update Debian cowbuilder chroot -----------------------"
sudo cowbuilder --update --autocleanaptcache --basepath /var/cache/pbuilder/base.cow

if [ "$dobullseye" = "yes" ] ; then 
  if [ -d /var/cache/pbuilder/bullseye-base.cow ] ; then
    echo ""
    echo ""
    echo "------------------ update bullseye cowbuilder chroot -----------------------"
    # COMPONENTS="main universe" sudo cowbuilder --update --basepath /var/cache/pbuilder/trusty.cow --distribution trusty
    sudo cowbuilder --update --basepath /var/cache/pbuilder/bullseye-base.cow --distribution bullseye
  fi
fi

