scripts: Replace hardcoded patches path with GLUON_PATCHESSDIR variable

Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Petr Štetiar 2018-10-23 17:55:12 +02:00
parent c7886526b2
commit dd149098f4
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ for module in $GLUON_MODULES; do
git clone -s -b base --single-branch "$GLUONDIR/$module" "$PATCHDIR" 2>/dev/null git clone -s -b base --single-branch "$GLUONDIR/$module" "$PATCHDIR" 2>/dev/null
cd "$PATCHDIR" cd "$PATCHDIR"
for patch in "$GLUONDIR/patches/$module"/*.patch; do for patch in "${GLUON_PATCHESDIR}/$module"/*.patch; do
git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' -c commit.gpgsign=false am --whitespace=nowarn --committer-date-is-author-date "$patch" git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' -c commit.gpgsign=false am --whitespace=nowarn --committer-date-is-author-date "$patch"
done done

View File

@ -11,14 +11,14 @@ GLUONDIR="$(pwd)"
for module in $GLUON_MODULES; do for module in $GLUON_MODULES; do
echo "--- Updating patches for module '$module' ---" echo "--- Updating patches for module '$module' ---"
rm -rf "$GLUONDIR"/patches/"$module" rm -rf "${GLUON_PATCHESDIR}/$module"
cd "$GLUONDIR"/"$module" cd "$GLUONDIR"/"$module"
n=0 n=0
for commit in $(git rev-list --reverse --no-merges base..patched); do for commit in $(git rev-list --reverse --no-merges base..patched); do
let n=n+1 let n=n+1
mkdir -p "$GLUONDIR"/patches/"$module" mkdir -p "${GLUON_PATCHESDIR}/$module"
git -c core.abbrev=40 show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames --binary "$commit" > "$GLUONDIR/patches/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch" 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
done done