gluon/scripts/patch.sh

23 lines
362 B
Bash
Raw Normal View History

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