]> git.pld-linux.org Git - packages/ctags.git/blob - branch.sh
branch.sh: update md5 dropin
[packages/ctags.git] / branch.sh
1 #!/bin/sh
2 set -e
3 package=ctags
4 svn=svn://svn.code.sf.net/p/ctags/code
5 tag=ctags-5.8
6 out=branch.diff
7
8 d=$-
9 filter() {
10         set -$d
11         # Excluding files which change version or were not in dist tarball
12         filterdiff \
13                 -x 'NEWS' \
14                 -x 'maintainer.mak' \
15                 -x 'Test/*' \
16                 -x 'website/*' \
17                 | \
18         # remove revno's for smaller diffs
19         sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
20 }
21
22 old=$svn/tags/$tag
23 new=$svn/trunk
24 echo >&2 "Running diff: $old -> $new"
25 LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
26 revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
27 echo >&2 "Revision $revno"
28 [ "$revno" -gt 0 ] || exit 1
29
30 sed -i -e "1i# Revision $revno" $out.tmp
31 filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
32
33 if cmp -s $out{,.tmp}; then
34         echo >&2 "No new diffs..."
35         rm -f $out.tmp
36         exit 0
37 fi
38 mv -f $out{.tmp,}
39
40 ../md5 $package.spec
41 ../dropin $out
This page took 0.084404 seconds and 3 git commands to generate.