summaryrefslogtreecommitdiff
path: root/localcowbuilder-update
blob: 2aa794347fc64c7238eb73d5edfa881de8853dc6 (plain)
  1. #!/bin/sh
  2. if [ $# -eq 0 ]; then
  3. echo "Usage: $(basename $0) POOL"
  4. echo ""
  5. echo "Example: $(basename $0) sarge_with_hacks"
  6. exit 1
  7. fi
  8. set -x
  9. for pool in $@; do
  10. basepath="/var/cache/pbuilder/cow-$pool"
  11. aptcache="/var/cache/pbuilder/aptcache-$pool/"
  12. # sudo cowbuilder --update \
  13. # --basepath "$basepath" \
  14. # --aptcache "$aptcache"
  15. sudo find "$aptcache" -type f -exec cp -a '{}' "$basepath/var/cache/apt/archives/" ';'
  16. sudo chroot "$basepath" apt-get -y --force-yes update
  17. sudo chroot "$basepath" apt-get -y --force-yes upgrade
  18. sudo chroot "$basepath" apt-get -y --force-yes clean
  19. done