2013-12-28 14:11:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
shopt -s nullglob
|
|
|
|
|
2015-01-11 08:48:31 +00:00
|
|
|
. "$GLUONDIR"/scripts/modules.sh
|
2013-12-28 14:11:59 +00:00
|
|
|
|
|
|
|
for module in $GLUON_MODULES; do
|
2015-01-11 08:48:31 +00:00
|
|
|
cd "$GLUONDIR"/$module
|
2013-12-31 16:03:39 +00:00
|
|
|
git checkout -B patching base
|
2013-12-28 14:11:59 +00:00
|
|
|
|
2015-01-11 08:48:31 +00:00
|
|
|
if [ "$(echo "$GLUONDIR"/patches/$module/*.patch)" ]; then
|
2015-01-21 16:37:41 +00:00
|
|
|
git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' am --whitespace=nowarn "$GLUONDIR"/patches/$module/*.patch || (
|
2013-12-31 16:03:39 +00:00
|
|
|
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
|