blob: 944d4519cb671af2760865152e37f0fbacac4e30 (
plain)
- #!/bin/sh
- set -e
- PRG=$(basename "$0")
- function showhelp() {
- cat <<EOF
- Usage: $PRG POOL [ DISTRIBUTION [ OTHERMIRROR] ]
- Examples:
- $PRG sarge
- $PRG sarge+hacks sarge 'deb http://example.com/ sarge hacks'
- EOF
- }
- if [ $# -eq 0 ]; then
- showhelp
- exit 1
- fi
- pool=$1
- distro=${2:-$pool}
- basetgz="/var/cache/pbuilder/base-$pool.tgz"
- buildplace="/var/cache/pbuilder/build-$pool/"
- aptcache="/var/cache/pbuilder/aptcache-$pool/"
- buildresult="$HOME/src/pbuild-$pool/"
- sudo pbuilder create \
- --buildresult "$buildresult" \
- --distribution "$distro" \
- --basetgz "$basetgz" \
- --buildplace "$buildplace" \
- --aptcache "$aptcache" \
- ${3:+--othermirror "$3"}
|