| |
| |
| set -e |
| |
| |
| |
| |
| |
| rhel_version=7.7 |
| |
| |
| if [ ! -f libguestfs.spec ]; then |
| echo "$0: run this from the directory containing 'libguestfs.spec'" |
| exit 1 |
| fi |
| |
| git_checkout=$HOME/d/libguestfs-rhel-$rhel_version |
| if [ ! -d $git_checkout ]; then |
| echo "$0: $git_checkout does not exist" |
| echo "This script is only for use by the maintainer when preparing a" |
| echo "libguestfs release on RHEL." |
| exit 1 |
| fi |
| |
| |
| version=`grep '^Version:' libguestfs.spec | awk '{print $2}'` |
| tag="v$version" |
| |
| |
| git rm -f [0-9]*.patch ||: |
| rm -f [0-9]*.patch |
| |
| |
| (cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N $tag) |
| mv $git_checkout/[0-9]*.patch . |
| |
| |
| rm -f *NOT-FOR-RPM*.patch |
| |
| |
| git add [0-9]*.patch |
| |
| |
| echo |
| echo "--- Copy the following text into libguestfs.spec file" |
| echo |
| |
| echo "# Patches." |
| for f in [0-9]*.patch; do |
| n=`echo $f | awk -F- '{print $1}'` |
| echo "Patch$n: $f" |
| done |
| |
| echo |
| echo "--- End of text" |