copy-patches: make it run on Laszlo's laptop too
Port virt-v2v dist-git commits cd77acc43380, 99c8749f70fb, and 818a2d3d6a80, to "copy-patches.sh". resolves: rhbz#2030709, rhbz#2034160 Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
e0c7084adb
commit
887dcfdf42
@ -7,24 +7,29 @@ set -e
|
||||
# it like this:
|
||||
# ./copy-patches.sh
|
||||
|
||||
project=libguestfs
|
||||
rhel_version=9.0.0
|
||||
|
||||
# Check we're in the right directory.
|
||||
if [ ! -f libguestfs.spec ]; then
|
||||
echo "$0: run this from the directory containing 'libguestfs.spec'"
|
||||
if [ ! -f $project.spec ]; then
|
||||
echo "$0: run this from the directory containing '$project.spec'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git_checkout=$HOME/d/libguestfs-rhel-$rhel_version
|
||||
case `id -un` in
|
||||
rjones) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
||||
lacos) git_checkout=$HOME/src/v2v/$project ;;
|
||||
*) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
||||
esac
|
||||
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."
|
||||
echo "$project release on RHEL."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the base version of libguestfs.
|
||||
version=`grep '^Version:' libguestfs.spec | awk '{print $2}'`
|
||||
# Get the base version of the project.
|
||||
version=`grep '^Version:' $project.spec | awk '{print $2}'`
|
||||
tag="v$version"
|
||||
|
||||
# Remove any existing patches.
|
||||
@ -43,7 +48,7 @@ git add [0-9]*.patch
|
||||
|
||||
# Print out the patch lines.
|
||||
echo
|
||||
echo "--- Copy the following text into libguestfs.spec file"
|
||||
echo "--- Copy the following text into $project.spec file"
|
||||
echo
|
||||
|
||||
echo "# Patches."
|
||||
|
Loading…
Reference in New Issue
Block a user