]> git.pld-linux.org Git - packages/lighttpd.git/commitdiff
- move filtering code to function
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 21 Sep 2009 13:34:07 +0000 (13:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    branch.sh -> 1.14

branch.sh

index 50fd80754a01e6d90acb1aa26af61e7e6346983e..35b945d45aa0579c931f8d73321d8a14b3884931 100644 (file)
--- a/branch.sh
+++ b/branch.sh
@@ -4,15 +4,23 @@ svn=svn://svn.lighttpd.net/lighttpd
 tag=lighttpd-1.4.23
 branch=lighttpd-1.4.x
 
+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,'
+}
+
 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 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' lighttpd-branch.diff.tmp > lighttpd-branch.diff.tmp2
-mv -f lighttpd-branch.diff.tmp2 lighttpd-branch.diff
-rm -f lighttpd-branch.diff.tmp
+echo >&2 "Running diff: $old -> $new"
+LC_ALL=C svn diff --old=$old --new=$new | filter > lighttpd-branch.diff.tmp
 
-# remove revno's for smaller diffs
-sed -i -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,' lighttpd-branch.diff
+if cmp -s lighttpd-branch.diff{,.tmp}; then
+       echo >&2 "No new diffs..."
+       rm -f lighttpd-branch.diff.tmp
+       exit 0
+fi
+mv -f lighttpd-branch.diff{.tmp,}
This page took 0.039341 seconds and 4 git commands to generate.