1 #!/bin/bash
2 # (c) 2009 - 2012 Koen Kooi <koen@dominion.thruhere.net>
3 # This script will take a set of directories with patches and make a git tree out of it
4 # After all the patches are applied it will output a SRC_URI fragment you can copy/paste into a recipe
5 set -e
7 TAG="v3.0.17"
8 EXTRATAG=""
9 PATCHPATH=$(dirname $0)
11 git am --abort || echo "Do you need to make sure the patches apply cleanly first?"
12 git reset --hard ${TAG}
13 rm export -rf
15 previous=${TAG}
16 PATCHSET="pm-wip/voltdm pm-wip/cpufreq beagle madc sakoman sgx ulcd omap4 misc usb"
18 # apply patches
19 for patchset in ${PATCHSET} ; do
20 git am $PATCHPATH/$patchset/*
21 git tag "${TAG}-${patchset}${EXTRATAG}" -f
22 done
24 # export patches and output SRC_URI for them
25 for patchset in ${PATCHSET} ; do
26 mkdir export/$patchset -p
27 ( cd export/$patchset && git format-patch ${previous}..${TAG}-${patchset}${EXTRATAG} >& /dev/null && for i in *.patch ; do echo " file://${patchset}/$i \\" ; done )
28 previous=${TAG}-${patchset}${EXTRATAG}
29 done