X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=branch.sh;h=3587b2f672201777824091b2e120ac8db675a4db;hb=591ca263b6883b021a74d9017061d7885b758d71;hp=2fe3c6754cab8ec92692932ed9a971f74010a2d3;hpb=9a17f7bdc1cfb9f69a615f18468e65abc9c8faf7;p=packages%2Flighttpd.git diff --git a/branch.sh b/branch.sh old mode 100644 new mode 100755 index 2fe3c67..3587b2f --- a/branch.sh +++ b/branch.sh @@ -1,45 +1,59 @@ #!/bin/sh set -e svn=svn://svn.lighttpd.net/lighttpd -tag=lighttpd-1.4.25 -branch=lighttpd-1.4.x -out=lighttpd-branch.diff +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 \ - -x 'ChangeLog' \ + filterdiff -p1 \ + -x '.gitignore' \ -x 'CMakeLists.txt' \ - -x 'configure.ac' \ - -x 'configure.in' \ - -x '.cvsignore' \ - -x 'doc/.cvsignore' \ -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,' + -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 -u) -echo >&2 "Revision $revno" -sed -i -e "1i# Revision $revno" $out.tmp -filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp} +if [ ! -d $repo ]; then + git clone --bare $url -b $branch $repo +fi -if cmp -s lighttpd-branch.diff{,.tmp}; then +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 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