#!/bin/sh

set -e
set -x

SRC_BRANCH=debian/dalmatian

git push origin ${SRC_BRANCH}

for TARGET_BRANCH in caracal bobcat antelope zed yoga xena wallaby victoria ussuri train stein rocky ; do
	git checkout debian/${TARGET_BRANCH}
	while ! git pull ; do
		sleep 0.1
	done
	git merge ${SRC_BRANCH} -m "merge ${SRC_BRANCH} into debian/${TARGET_BRANCH}"
	while ! git push origin debian/${TARGET_BRANCH} ; do
		sleep 0.1
	done
done
git checkout ${SRC_BRANCH}
