#!/bin/bash
# run this to apply the diff for each flavor in case you changed the
# SLE template

# generate Leap template from SLE template
patch -p0 SLES12-SP3-JeOS.template openSUSE-Leap-42.3-JeOS.diff -o openSUSE-Leap-42.3-JeOS.template

flavors=("kvm-and-xen" "MS-HyperV" "OpenStack-Cloud" "VMware" "XEN" "VirtualBox")

for f in "${flavors[@]}"; do
	patch -p0 -i openSUSE-Leap-42.3-JeOS-for-$f.diff -o openSUSE-Leap-42.3-JeOS-for-$f.kiwi
done

