Skip to content
Snippets Groups Projects
Commit 1b331343 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Make patch and update scripts a bit nicer

parent a6ae2786
Branches
Tags
No related merge requests found
......@@ -21,6 +21,7 @@ export TOPDIR
update: FORCE
$(GLUONDIR)/scripts/update.sh $(GLUONDIR)
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
patch: FORCE
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
......
......@@ -7,8 +7,15 @@ shopt -s nullglob
for module in $GLUON_MODULES; do
dir="$1"/$module
git -C $dir checkout -B patched base
git -C $dir checkout -B patching base
if [ -z "$1"/patches/$module/*.patch ]; then continue; fi
git -C "$dir" am "$1"/patches/$module/*.patch
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
done
......@@ -11,6 +11,7 @@ for module in $GLUON_MODULES; do
eval repo=\${MODULE_${var}_REPO}
eval commit=\${MODULE_${var}_COMMIT}
git -C "$dir" init
git -C "$dir" fetch $repo
git -C "$dir" checkout $commit 2>/dev/null || git -C "$dir" fetch $repo
git -C "$dir" checkout -B base $commit
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment