#!/bin/sh
set -e
svn=svn://svn.lighttpd.net/lighttpd
-tag=lighttpd-1.4.23
-branch=lighttpd-1.4.x
+url=https://git.lighttpd.net/lighttpd/lighttpd1.4.git
+package=lighttpd
+tag=lighttpd-1.4.41
+branch=master
+out=$package-branch.diff
+repo=$package.git
+
+# old version of this code used to create tarball.
+# leave it around
+if [ "$1" = "tarball" ]; then
+ v=1.5
+ svn co $svn/trunk $package-$v
+ r=$(svnversion $package-$v)
+ t=$package-r$r.tar.bz2
+ tar -cjf $t --exclude-vcs $package-$v
+ ../dropin $t &
+ exit 0
+fi
d=$-
filter() {
set -$d
# Excluding files which change version or were not in dist tarball
- filterdiff -x tests/mod-extforward.conf -x ChangeLog -x .cvsignore -x src/.cvsignore -x tests/.cvsignore -x doc/.cvsignore -x 'configure.in' -x 'SConstruct' -x 'CMakeLists.txt' -x 'src/CMakeLists.txt' -x 'src/config.h.cmake' -x 'src/mod_uploadprogress.c' | \
- # remove revno's for smaller diffs
- sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
+ filterdiff -p1 \
+ -x 'CMakeLists.txt' \
+ -x 'configure.ac' \
+ -x 'SConstruct' \
+ -x 'packdist.sh' \
+ | cat
}
-old=$svn/tags/$tag
-new=$svn/branches/$branch
-echo >&2 "Running diff: $old -> $new"
-LC_ALL=C svn diff --old=$old --new=$new | filter > lighttpd-branch.diff.tmp
+if [ ! -d $repo ]; then
+ git clone --bare $url -b $branch $repo
+fi
+
+cd $repo
+ git fetch origin +$branch:refs/remotes/origin/$branch +refs/tags/$tag:refs/tags/$tag
+ git log -p --reverse $tag..$branch | filter > ../$out.tmp
+cd ..
-if cmp -s lighttpd-branch.diff{,.tmp}; then
+if cmp -s $out{,.tmp}; then
echo >&2 "No new diffs..."
- rm -f lighttpd-branch.diff.tmp
+ rm -f $out.tmp
exit 0
fi
-mv -f lighttpd-branch.diff{.tmp,}
+mv -f $out{.tmp,}
+
+../md5 $package.spec
+../dropin $out