]> git.pld-linux.org Git - packages/ddclient.git/blame - branch.sh
up to 3.8.2, added ChangeIP (changeip.com)
[packages/ddclient.git] / branch.sh
CommitLineData
a01180bf
ER
1#!/bin/sh
2set -e
3svn=https://ddclient.svn.sourceforge.net/svnroot/ddclient
4tag=release-3.8.0
5out=branch.diff
6
7d=$-
8filter() {
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
20old=$svn/tags/$tag
21new=$svn/trunk
22echo >&2 "Running diff: $old -> $new"
23LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
24revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
25echo >&2 "Revision $revno"
26[ "$revno" -gt 0 ] || exit 1
27
28sed -i -e "1i# Revision $revno" $out.tmp
29filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
30
31if cmp -s branch.diff{,.tmp}; then
32 echo >&2 "No new diffs..."
33 rm -f branch.diff.tmp
34 exit 0
35fi
36mv -f branch.diff{.tmp,}
This page took 0.070064 seconds and 4 git commands to generate.