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