edf998
#! /bin/bash -e
978ce4
978ce4
done=false
978ce4
if [ "x$1" = "xjames" ]; then
978ce4
    done=true
James Antill 567ec6
    cvs=~/work/fedora/cvs/yum
978ce4
    git=~/work/rpm/private/yum
978ce4
fi
978ce4
if [ "x$1" = "xseth" ]; then
978ce4
    done=true
Seth Vidal f2d616
    cvs=~/proj/fedora/yum/master
Seth Vidal cd4a9b
    git=~/proj/yum/3.2.X
978ce4
fi
63f45c
if [ "x$1" = "xvalentina" ]; then
63f45c
    done=true
63f45c
    cvs=~/devel/fedora/yum
63f45c
    git=~/devel/upstream/yum
63f45c
fi
978ce4
if ! $done; then
978ce4
63f45c
  echo " Usage: $0 james | seth | valentina" 1>&2
978ce4
  echo "" 1>&2
978ce4
  echo "  This command copies the latest git HEAD into Fedora rawhide," 1>&2
978ce4
  echo " working out the versions automatically. It also makes the" 1>&2
978ce4
  echo " diff between HEADs as minimal as possible. " 1>&2
978ce4
  exit 1
978ce4
fi
978ce4
978ce4
cd $cvs
Seth Vidal f2d616
ver=$(/usr/bin/fedpkg verrel | perl -lpe 's/-[^-]+$//' | sed s/\\\./-/g)
978ce4
978ce4
cd $git
James Antill 452469
git diff -r $ver..HEAD  > $cvs/yum-HEAD.patch