qemu/pkg2git.sh

41 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
set -e
source ./config.sh
echo "Exporting the package's git bundles to the local repo's frombundle branches..."
echo "(If SUCCESS is not printed upon completion, see /tmp/pkg2git.log for issues)"
# TEMPORARY! FOR NOW WE REQUIRE THESE LOCALLY TO DO WORK ON PACKAGE
REQUIRED_LOCAL_REPO_MAP=(
~/git/qemu-opensuse
~/git/qemu-seabios
~/git/qemu-ipxe
~/git/qemu-sgabios
~/git/qemu-skiboot
~/git/qemu-keycodemapdb
)
# Validate that all the local repos that we currently have patches in are available
# TEMPORARY REQUIREMENT!
for entry in ${REQUIRED_LOCAL_REPO_MAP[@]}; do
if [[ -e $(readlink -f ${entry}) ]]; then
if $(git -C $entry branch| grep -F "$GIT_BRANCH" >/dev/null); then
:
else
echo "Didn't find the $GIT_BRANCH branch in repo at $entry"
exit
fi
else
echo "ERROR! For now, you need to have these local git repos available:"
echo ${REQUIRED_LOCAL_REPO_MAP[@]}
fi
done
./bundle2local.sh &> /tmp/pkg2git.log
echo "SUCCESS"
echo "To modify package patches, use the frombundle branch as the basis for updating"
echo "the $GIT_BRANCH branch with the new patch queue."
echo "Then export the changes back to the package using git2pkg.sh"