]> git.pld-linux.org Git - packages/lighttpd.git/blob - branch.sh
eea028d044d724514dc4625e06f3a9365a513ab1
[packages/lighttpd.git] / branch.sh
1 #!/bin/sh
2 set -e
3 svn=svn://svn.lighttpd.net/lighttpd
4 url=https://git.lighttpd.net/lighttpd/lighttpd1.4.git
5 package=lighttpd
6 tag=lighttpd-1.4.40
7 branch=master
8 out=$package-branch.diff
9 repo=$package.git
10
11 # old version of this code used to create tarball.
12 # leave it around
13 if [ "$1" = "tarball" ]; then
14         v=1.5
15         svn co $svn/trunk $package-$v
16         r=$(svnversion $package-$v)
17         t=$package-r$r.tar.bz2
18         tar -cjf $t --exclude-vcs $package-$v
19         ../dropin $t &
20         exit 0
21 fi
22
23 d=$-
24 filter() {
25         set -$d
26         # Excluding files which change version or were not in dist tarball
27         filterdiff \
28                 -x 'CMakeLists.txt' \
29                 -x 'configure.ac' \
30                 -x 'SConstruct' \
31         | cat
32 }
33
34 if [ ! -d $repo ]; then
35         git clone --bare $url -b $branch $repo
36 fi
37
38 cd $repo
39         git fetch
40         git diff $tag..$branch | filter > ../$out.tmp
41 cd ..
42
43 if cmp -s $out{,.tmp}; then
44         echo >&2 "No new diffs..."
45         rm -f $out.tmp
46         exit 0
47 fi
48 mv -f $out{.tmp,}
49
50 ../md5 $package.spec
51 ../dropin $out
This page took 0.057388 seconds and 2 git commands to generate.