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
|
2013-12-28 14:31:11 +00:00
|
|
|
dir="$1"/$module
|
2013-12-28 20:35:16 +00:00
|
|
|
git -C $dir checkout -B patching base
|
2013-12-28 14:11:59 +00:00
|
|
|
|
2013-12-28 14:31:11 +00:00
|
|
|
if [ -z "$1"/patches/$module/*.patch ]; then continue; fi
|
2013-12-28 20:35:16 +00:00
|
|
|
git -C "$dir" am "$1"/patches/$module/*.patch || (
|
|
|
|
git -C "$dir" am --abort
|
|
|
|
git -C "$dir" checkout patched
|
|
|
|
git -C "$dir" branch -D patching
|
|
|
|
false
|
|
|
|
)
|
|
|
|
git -C "$dir" checkout -B patched
|
|
|
|
git -C "$dir" branch -d patching
|
2013-12-28 14:11:59 +00:00
|
|
|
done
|