Blob Blame Raw
#! /bin/bash -e

done=false
if [ "x$1" = "xjames" ]; then
    done=true
    cvs=~/work/fedora/cvs/yum
    git=~/work/rpm/private/yum
fi
if [ "x$1" = "xseth" ]; then
    done=true
    cvs=~/proj/fedora/yum/master
    git=~/proj/yum/3.2.X
fi
if [ "x$1" = "xvalentina" ]; then
    done=true
    cvs=~/devel/fedora/yum
    git=~/devel/upstream/yum
fi
if ! $done; then

  echo " Usage: $0 james | seth | valentina" 1>&2
  echo "" 1>&2
  echo "  This command copies the latest git HEAD into Fedora rawhide," 1>&2
  echo " working out the versions automatically. It also makes the" 1>&2
  echo " diff between HEADs as minimal as possible. " 1>&2
  exit 1
fi

cd $cvs
ver=$(/usr/bin/fedpkg verrel | perl -lpe 's/-[^-]+$//' | sed s/\\\./-/g)

cd $git
git diff -r $ver..HEAD  > $cvs/yum-HEAD.patch