]> git.pld-linux.org Git - packages/lighttpd.git/blame - branch.sh
update md5 after branch.diff update
[packages/lighttpd.git] / branch.sh
CommitLineData
68f8f1d1 1#!/bin/sh
51e3e0fc
ER
2set -e
3svn=svn://svn.lighttpd.net/lighttpd
c2f7af02
ER
4package=lighttpd
5tag=lighttpd-1.4.36
6branch=lighttpd-1.4.x
7out=lighttpd-branch.diff
8
9# old version of this code used to create tarball.
10# leave it around
11if [ "$1" = "tarball" ]; then
12 v=1.5
13 svn co $svn/trunk $package-$v
14 r=$(svnversion $package-$v)
15 t=$package-r$r.tar.bz2
16 tar -cjf $t --exclude-vcs $package-$v
17 ../dropin $t &
18 exit 0
19fi
20
21d=$-
22filter() {
23 set -$d
24 # remove revno's for smaller diffs
25 sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
26}
27
28old=$svn/tags/$tag
29new=$svn/branches/$branch
30echo >&2 "Running diff: $old -> $new"
31LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
32revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
33echo >&2 "Revision $revno"
34[ "$revno" -gt 0 ] || exit 1
35
36sed -i -e "1i# Revision $revno" $out.tmp
37filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
38
39if cmp -s $out{,.tmp}; then
40 echo >&2 "No new diffs..."
41 rm -f $out.tmp
42 exit 0
43fi
44mv -f $out{.tmp,}
4292d306
ER
45
46../md5 *.spec
This page took 0.053908 seconds and 4 git commands to generate.