]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - branch.sh
up to 1.4.50
[packages/lighttpd.git] / branch.sh
old mode 100644 (file)
new mode 100755 (executable)
index 87efcd8..3587b2f
--- a/branch.sh
+++ b/branch.sh
@@ -1,15 +1,59 @@
 #!/bin/sh
 set -e
 svn=svn://svn.lighttpd.net/lighttpd
-tag=lighttpd-1.4.22
-branch=lighttpd-1.4.x
-
-old=$svn/tags/$tag
-new=$svn/branches/$branch
-echo "Running diff: $old -> $new"
-LC_ALL=C svn diff --old=$old --new=$new > lighttpd-branch.diff.tmp
-
-echo "Excluding files which change version or were not in dist tarball"
-filterdiff -x 'configure.in' -x 'SConstruct' -x 'CMakeLists.txt' -x 'src/CMakeLists.txt' -x 'src/config.h.cmake' -x 'src/mod_uploadprogress.c' lighttpd-branch.diff.tmp > lighttpd-branch.diff.tmp2
-mv -f lighttpd-branch.diff.tmp2 lighttpd-branch.diff
-rm -f lighttpd-branch.diff.tmp
+url=https://git.lighttpd.net/lighttpd/lighttpd1.4.git
+package=lighttpd
+tag=lighttpd-1.4.45
+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 -p1 \
+               -x '.gitignore' \
+               -x 'CMakeLists.txt' \
+               -x 'SConstruct' \
+               -x 'configure.ac' \
+               -x 'packdist.sh' \
+       | cat
+}
+
+if [ ! -d $repo ]; then
+       git clone --bare $url -b $branch $repo
+fi
+
+cd $repo
+       git fetch origin +$branch:$branch +refs/tags/$tag:refs/tags/$tag
+       git log -p --reverse $tag..$branch | filter > ../$out.tmp
+cd ..
+
+if ! test -s $out.tmp; then
+       echo >&2 "No diffs..."
+       rm -f $out.tmp
+       exit 0
+fi
+
+if cmp -s $out{,.tmp}; then
+       echo >&2 "No new diffs..."
+       rm -f $out.tmp
+       exit 0
+fi
+mv -f $out{.tmp,}
+
+../md5 $package.spec
+../dropin $out
This page took 0.051211 seconds and 4 git commands to generate.