2013-12-28 14:11:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
shopt -s nullglob
|
|
|
|
|
2014-01-02 14:16:32 +00:00
|
|
|
. "$1"/scripts/modules.sh
|
2013-12-28 14:11:59 +00:00
|
|
|
|
|
|
|
for module in $GLUON_MODULES; do
|
2013-12-31 16:03:39 +00:00
|
|
|
cd "$1"/$module
|
|
|
|
git checkout -B patching base
|
2013-12-28 14:11:59 +00:00
|
|
|
|
2013-12-28 21:43:16 +00:00
|
|
|
if [ "$1"/patches/$module/*.patch ]; then
|
2013-12-31 16:03:39 +00:00
|
|
|
git am "$1"/patches/$module/*.patch || (
|
|
|
|
git am --abort
|
|
|
|
git checkout patched
|
|
|
|
git branch -D patching
|
2013-12-28 21:43:16 +00:00
|
|
|
false
|
|
|
|
)
|
|
|
|
fi
|
2014-01-02 14:16:32 +00:00
|
|
|
git branch -M patched
|
2013-12-28 14:11:59 +00:00
|
|
|
done
|