]> git.pld-linux.org Git - packages/ddclient.git/blob - branch.sh
up to 3.8.2, added ChangeIP (changeip.com)
[packages/ddclient.git] / branch.sh
1 #!/bin/sh
2 set -e
3 svn=https://ddclient.svn.sourceforge.net/svnroot/ddclient
4 tag=release-3.8.0
5 out=branch.diff
6
7 d=$-
8 filter() {
9         set -$d
10         # Excluding files which change version or were not in dist tarball
11         filterdiff \
12                 -x 'release/readme.txt' \
13                 -x '.cvsignore' \
14                 -x 'patches/*' \
15                 | \
16         # remove revno's for smaller diffs
17         sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
18 }
19
20 old=$svn/tags/$tag
21 new=$svn/trunk
22 echo >&2 "Running diff: $old -> $new"
23 LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
24 revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
25 echo >&2 "Revision $revno"
26 [ "$revno" -gt 0 ] || exit 1
27
28 sed -i -e "1i# Revision $revno" $out.tmp
29 filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
30
31 if cmp -s branch.diff{,.tmp}; then
32         echo >&2 "No new diffs..."
33         rm -f branch.diff.tmp
34         exit 0
35 fi
36 mv -f branch.diff{.tmp,}
This page took 0.092123 seconds and 3 git commands to generate.