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