2024-09-15 10:09:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# List of branches to pull and merge
|
|
|
|
branches=(
|
|
|
|
"cooker"
|
|
|
|
"feat/shadps4"
|
|
|
|
"feat/steam-rom-manager"
|
2024-09-17 08:41:29 +00:00
|
|
|
"feat/godot"
|
2024-09-23 12:41:31 +00:00
|
|
|
"feat/xenia"
|
2024-09-15 10:09:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Get the current branch name
|
|
|
|
current_branch=$(git branch --show-current)
|
|
|
|
|
|
|
|
# Check if the current branch contains 'feat/' and 'okonomiyaki'
|
|
|
|
if [[ $current_branch == feat/* && $current_branch == *okonomiyaki* ]]; then
|
|
|
|
echo "Current branch is $current_branch, proceeding with fetch, pull, and merge."
|
|
|
|
|
|
|
|
# Iterate through the list of branches
|
|
|
|
for branch in "${branches[@]}"; do
|
|
|
|
echo "Fetching $branch..."
|
|
|
|
git fetch origin $branch
|
|
|
|
|
|
|
|
echo "Pulling $branch..."
|
|
|
|
git pull origin $branch
|
|
|
|
|
|
|
|
echo "Merging $branch into $current_branch..."
|
2024-09-15 10:11:30 +00:00
|
|
|
if ! git merge origin/$branch; then
|
|
|
|
echo "Merge conflict detected while merging $branch!"
|
|
|
|
echo "Please resolve the conflict, then run 'git merge --continue' to finish the merge."
|
|
|
|
exit 1 # Exit the script due to conflict
|
|
|
|
fi
|
2024-09-15 10:09:01 +00:00
|
|
|
done
|
|
|
|
else
|
|
|
|
echo "Current branch is not an okonomiyaki branch, quitting."
|
|
|
|
exit 1
|
|
|
|
fi
|