]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - branch.sh
exclude files which change version
[packages/lighttpd.git] / branch.sh
old mode 100644 (file)
new mode 100755 (executable)
index 2105278..cdd909f
--- a/branch.sh
+++ b/branch.sh
@@ -1,26 +1,31 @@
 #!/bin/sh
 set -e
 svn=svn://svn.lighttpd.net/lighttpd
-tag=lighttpd-1.4.23
+package=lighttpd
+tag=lighttpd-1.4.36
 branch=lighttpd-1.4.x
+out=lighttpd-branch.diff
+
+# 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 'ChangeLog' \
                -x 'CMakeLists.txt' \
-               -x 'configure.in' \
-               -x '.cvsignore' \
-               -x 'doc/.cvsignore' \
+               -x 'configure.ac' \
                -x 'SConstruct' \
-               -x 'src/CMakeLists.txt' \
-               -x 'src/config.h.cmake' \
-               -x 'src/.cvsignore' \
-               -x 'src/mod_uploadprogress.c' \
-               -x 'tests/.cvsignore' \
-               -x 'tests/mod-extforward.conf' \
                | \
        # remove revno's for smaller diffs
        sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
@@ -29,11 +34,19 @@ filter() {
 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
+LC_ALL=C svn diff --old=$old --new=$new > $out.tmp
+revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1)
+echo >&2 "Revision $revno"
+[ "$revno" -gt 0 ] || exit 1
 
-if cmp -s lighttpd-branch.diff{,.tmp}; then
+sed -i -e "1i# Revision $revno" $out.tmp
+filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
+
+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 *.spec
This page took 0.031268 seconds and 4 git commands to generate.