gluon/scripts/update-patches.sh
Petr Štetiar dd149098f4 scripts: Replace hardcoded patches path with GLUON_PATCHESSDIR variable
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-02-20 14:50:08 +01:00

25 lines
596 B
Bash
Executable File

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