summaryrefslogtreecommitdiff
path: root/localgitcowdebuild
blob: a8b86097f799cca202eaec5885f04cf9e83915b3 (plain)
  1. #!/bin/sh
  2. set -e
  3. PRG=$(basename "$0")
  4. function showhelp() {
  5. cat <<EOF
  6. Usage: $PRG POOL [debbuildopts] [git-buildpackage opts] [-- pbuilderopts]
  7. Example: $PRG --git-sign-tags sarge_with_hacks -B
  8. EOF
  9. }
  10. if [ $# -eq 0 ]; then
  11. showhelp
  12. exit 1
  13. fi
  14. pools=''
  15. gitopts=''
  16. debbuildopts=''
  17. while [ $# -gt 0 ]; do
  18. case $1 in
  19. -h|--help)
  20. showhelp
  21. exit 0
  22. ;;
  23. --)
  24. shift
  25. break
  26. ;;
  27. --git-*)
  28. gitopts="$gitopts $1"
  29. shift
  30. ;;
  31. --*)
  32. echo "ERROR: Unknown argument \"$1\"!" >&2
  33. showhelp
  34. exit 1
  35. ;;
  36. -*)
  37. debbuildopts="$debbuildopts $1"
  38. shift
  39. ;;
  40. *)
  41. pools="$pools $1"
  42. shift
  43. ;;
  44. esac
  45. done
  46. git-buildpackage \
  47. --git-builder="localcowdebuild -i\.git/ -I.git $debbuildopts $pools $@" \
  48. --git-cleaner="fakeroot debian/rules clean" \
  49. $gitopts