summaryrefslogtreecommitdiff
path: root/localcowbuilder-create
blob: 896447f756c7b0c6876f79b40372e94e3eff8810 (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. basepath="/var/cache/pbuilder/cow-$pool"
  19. aptcache="/var/cache/pbuilder/aptcache-$pool/"
  20. buildresult="$HOME/src/pbuild-$pool/"
  21. sudo cowbuilder --create \
  22. --buildresult "$buildresult" \
  23. --distribution "$distro" \
  24. --basepath "$basepath" \
  25. --aptcache "$aptcache" \
  26. ${3:+--othermirror "$3"}