From 4b4eb7d61c7884002d6e7d1e52beb1a33a8b0528 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 4 Aug 2018 22:08:58 +0200 Subject: [PATCH] - add branch script --- branch.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 branch.sh diff --git a/branch.sh b/branch.sh new file mode 100755 index 0000000..3cc006c --- /dev/null +++ b/branch.sh @@ -0,0 +1,32 @@ +#!/bin/sh +set -e +url=https://git.sipsolutions.net/dovecot-antispam.git/ +package=dovecot-antispam +tag=v2.0 +branch=master +out=$package-git.patch +repo=$package.git + +# use filterdiff, etc to exclude bad chunks from diff +filter() { + cat +} + +if [ ! -d $repo ]; then + git clone --bare $url -b $branch $repo +fi + +cd $repo + git fetch origin +$branch:$branch +refs/tags/$tag:refs/tags/$tag + git log -p --reverse $tag..$branch | filter > ../$out.tmp +cd .. + +if cmp -s $out{,.tmp}; then + echo >&2 "No new diffs..." + rm -f $out.tmp + exit 0 +fi +mv -f $out{.tmp,} + +../md5 $package.spec +../dropin $out -- 2.43.0