summaryrefslogtreecommitdiff
path: root/localpbuilder-create
blob: 944d4519cb671af2760865152e37f0fbacac4e30 (plain)
  1. #!/bin/sh
  2. set -e
  3. PRG=$(basename "$0")
  4. function showhelp() {
  5. cat <<EOF
  6. Usage: $PRG POOL [ DISTRIBUTION [ OTHERMIRROR] ]
  7. Examples:
  8. $PRG sarge
  9. $PRG sarge+hacks sarge 'deb http://example.com/ sarge hacks'
  10. EOF
  11. }
  12. if [ $# -eq 0 ]; then
  13. showhelp
  14. exit 1
  15. fi
  16. pool=$1
  17. distro=${2:-$pool}
  18. basetgz="/var/cache/pbuilder/base-$pool.tgz"
  19. buildplace="/var/cache/pbuilder/build-$pool/"
  20. aptcache="/var/cache/pbuilder/aptcache-$pool/"
  21. buildresult="$HOME/src/pbuild-$pool/"
  22. sudo pbuilder create \
  23. --buildresult "$buildresult" \
  24. --distribution "$distro" \
  25. --basetgz "$basetgz" \
  26. --buildplace "$buildplace" \
  27. --aptcache "$aptcache" \
  28. ${3:+--othermirror "$3"}