gluon/scripts/update-patches.sh
Matthias Schiffer d5f5ce74e8 build: add module separators/headings to patch/update/update-patches scripts
Suggested-by: Steffen Möller <steffen_moeller@gmx.de>
2016-03-26 00:03:04 +01:00

22 lines
544 B
Bash
Executable File

#!/bin/bash
set -e
shopt -s nullglob
. "$GLUONDIR"/scripts/modules.sh
for module in $GLUON_MODULES; do
echo "--- Updating patches for module '$module' ---"
rm -f "$GLUONDIR"/patches/$module/*.patch
mkdir -p "$GLUONDIR"/patches/$module
cd "$GLUONDIR"/$module
n=0
for commit in $(git rev-list --reverse --no-merges base..patched); do
let n=n+1
git show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' $commit > "$GLUONDIR"/patches/$module/"$(printf '%04u' $n)-$(git show -s --pretty=format:%f $commit).patch"
done
done