diff options
Diffstat (limited to 'localgitdebuild')
-rwxr-xr-x | localgitdebuild | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/localgitdebuild b/localgitdebuild index 983fe3d..d335be6 100755 --- a/localgitdebuild +++ b/localgitdebuild @@ -2,8 +2,45 @@ set -e -debuild \ - --set-envvar=CCACHE_DIR="/var/cache/pbuilder/ccache" \ - --set-envvar=PATH="/var/cache/pbuilder/bin:/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11" \ - -i\.git/ -I.git \ - "$@" +PRG=$(basename "$0") + +function showhelp() { + cat <<EOF +Usage: $PRG [git-buildpackage opts] [-- debuild opts] + +Example: $PRG --git-sign-tags +EOF +} + +if [ $# -eq 0 ]; then + showhelp + exit 1 +fi + +gitopts='' +while [ $# -gt 0 ]; do + case $1 in + -h|--help) + showhelp + exit 0 + ;; + --) + shift + break + ;; + --git-*) + gitopts="$gitopts $1" + shift + ;; + *) + echo "ERROR: Unknown argument \"$1\"!" &>2 + showhelp + exit 1 + ;; + esac +done + +git-buildpackage \ + --git-builder="localdebuild -i\.git/ -I.git $@" \ + --git-cleaner="fakeroot debian/rules clean" \ + $gitopts |