blob: cf397f24ec322fee3c8f9fdca315a61266473b1b (
plain)
- #!/bin/sh
- set -e
- PRG=$(basename "$0")
- function showhelp() {
- cat <<EOF
- Usage: $PRG POOL
- Example: $PRG sarge_with_hacks
- EOF
- }
- if [ $# -eq 0 ]; then
- showhelp
- exit 1
- fi
- export DEBIAN_FRONTEND="noninteractive"
- export LANG=C
- for pool in $@; do
- basepath="/var/cache/pbuilder/cow-$pool"
- aptcache="/var/cache/pbuilder/aptcache-$pool/"
- # sudo cowbuilder --update \
- # --basepath "$basepath" \
- # --aptcache "$aptcache"
- sudo find "$aptcache" -type f -exec cp -a '{}' "$basepath/var/cache/apt/archives/" ';'
- sudo chroot "$basepath" apt-get -y --force-yes update
- sudo chroot "$basepath" apt-get -y --force-yes upgrade
- sudo chroot "$basepath" apt-get -y --force-yes clean
- done
|