mirror of
https://git.rockylinux.org/rocky/pungi-rocky.git
synced 2024-10-31 18:31:24 +00:00
21 lines
537 B
Bash
Executable File
21 lines
537 B
Bash
Executable File
#!/bin/bash
|
|
HOWMANY="-$1"
|
|
if [ -z $1 ]; then
|
|
HOWMANY="-1"
|
|
fi
|
|
|
|
BRANCH=$(git branch --show-current)
|
|
if [[ ! "${BRANCH}" =~ "r8s" ]]; then
|
|
echo "Not a lookahead branch."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Fetching from upstream"
|
|
git fetch https://gitlab.com/redhat/centos-stream/release-engineering/pungi-centos.git centos-8-stream
|
|
echo "Formatting patch and applying..."
|
|
git format-patch --stdout ${HOWMANY} FETCH_HEAD | sed -e 's|centos/|rocky/|' | git apply
|
|
echo "!! DIFF OF CHANGES !!"
|
|
git --no-pager diff HEAD
|
|
|
|
echo "You may now commit and push."
|