summaryrefslogtreecommitdiff
path: root/localgitdebuild
blob: 9711d4a61353a69f63671c1a67eda6e8ef2a8b53 (plain)
  1. #!/bin/sh
  2. #
  3. # Copyright © 2007-2008 Jonas Smedegaard <dr@jones.dk>
  4. # Description: Compile Debian package from Git
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  19. # 02111-1307 USA.
  20. #
  21. # Depends: devscripts
  22. set -e
  23. PRG=$(basename "$0")
  24. showhelp() {
  25. cat <<EOF
  26. Usage: $PRG [gbp buildpackage opts] [-- debuild opts]
  27. Example: $PRG --git-sign-tags
  28. EOF
  29. }
  30. gitopts=''
  31. while [ $# -gt 0 ]; do
  32. case $1 in
  33. -h|--help)
  34. showhelp
  35. exit 0
  36. ;;
  37. --)
  38. shift
  39. break
  40. ;;
  41. --git-*)
  42. gitopts="$gitopts $1"
  43. shift
  44. ;;
  45. *)
  46. echo "ERROR: Unknown argument \"$1\"!" >&2
  47. showhelp
  48. exit 1
  49. ;;
  50. esac
  51. done
  52. gbp buildpackage \
  53. --git-builder="localdebuild $@" \
  54. --git-cleaner="fakeroot debian/rules clean" \
  55. $gitopts