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
|
2016-03-25 23:00:35 +00:00
|
|
|
echo "--- Patching module '$module' ---"
|
|
|
|
|
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-10-08 21:11:44 +00:00
|
|
|
for patch in "$GLUONDIR"/patches/$module/*.patch; do
|
2016-05-28 14:04:40 +00:00
|
|
|
if ! git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' -c commit.gpgsign=false am --whitespace=nowarn --committer-date-is-author-date "$patch"; then
|
2013-12-31 16:03:39 +00:00
|
|
|
git am --abort
|
|
|
|
git checkout patched
|
|
|
|
git branch -D patching
|
2015-10-08 21:11:44 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
2014-01-02 14:16:32 +00:00
|
|
|
git branch -M patched
|
2013-12-28 14:11:59 +00:00
|
|
|
done
|