]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - branch.sh
up to 1.4.50
[packages/lighttpd.git] / branch.sh
index 63bad8818c94855d48eb651b729b5bb3968c710a..3587b2f672201777824091b2e120ac8db675a4db 100755 (executable)
--- a/branch.sh
+++ b/branch.sh
@@ -1,10 +1,12 @@
 #!/bin/sh
 set -e
 svn=svn://svn.lighttpd.net/lighttpd
+url=https://git.lighttpd.net/lighttpd/lighttpd1.4.git
 package=lighttpd
-tag=lighttpd-1.4.36
-branch=lighttpd-1.4.x
-out=lighttpd-branch.diff
+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
@@ -21,20 +23,30 @@ fi
 d=$-
 filter() {
        set -$d
-       # remove revno's for smaller diffs
-       sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
+       # 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
 }
 
-old=$svn/tags/$tag
-new=$svn/branches/$branch
-echo >&2 "Running diff: $old -> $new"
-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 [ ! -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 ..
 
-sed -i -e "1i# Revision $revno" $out.tmp
-filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp}
+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..."
@@ -43,4 +55,5 @@ if cmp -s $out{,.tmp}; then
 fi
 mv -f $out{.tmp,}
 
-../md5 *.spec
+../md5 $package.spec
+../dropin $out
This page took 0.071397 seconds and 4 git commands to generate.