summaryrefslogtreecommitdiff
path: root/localgitpdebuild
blob: e1dbd082973a758a299af29e5070c44f76d44513 (plain)
  1. #!/bin/sh
  2. set -e
  3. PRG=$(basename "$0")
  4. function showhelp() {
  5. echo <<EOF
  6. Usage: $PRG POOL [debbuildopts] [-- pbuilderopts]
  7. Example: $PRG 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="localpdebuild -i\.git/ -I.git $debbuildopts $pools $@" \
  48. --git-cleaner="fakeroot debian/rules clean" \
  49. $gitopts