gluon/scripts/patch.sh
2013-12-31 17:03:39 +01:00

23 lines
362 B
Bash
Executable File

#!/bin/bash
set -e
shopt -s nullglob
. "$1"/modules
for module in $GLUON_MODULES; do
cd "$1"/$module
git checkout -B patching base
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
done