summaryrefslogtreecommitdiff
path: root/localcowbuilder-update
blob: 683147358eead7bd06ae81351ef8451aa00f1c91 (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. export DEBIAN_FRONTEND="noninteractive"
  9. export LANG=C
  10. for pool in $@; do
  11. basepath="/var/cache/pbuilder/cow-$pool"
  12. aptcache="/var/cache/pbuilder/aptcache-$pool/"
  13. # sudo cowbuilder --update \
  14. # --basepath "$basepath" \
  15. # --aptcache "$aptcache"
  16. sudo find "$aptcache" -type f -exec cp -a '{}' "$basepath/var/cache/apt/archives/" ';'
  17. sudo chroot "$basepath" apt-get -y --force-yes update
  18. sudo chroot "$basepath" apt-get -y --force-yes upgrade
  19. sudo chroot "$basepath" apt-get -y --force-yes clean
  20. done