From dd149098f46c6f6fe3cd75cd6e1182ac2580f710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 23 Oct 2018 17:55:12 +0200 Subject: [PATCH] scripts: Replace hardcoded patches path with GLUON_PATCHESSDIR variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Štetiar --- scripts/patch.sh | 2 +- scripts/update-patches.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/patch.sh b/scripts/patch.sh index 61d5f455..ff73658a 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -19,7 +19,7 @@ for module in $GLUON_MODULES; do git clone -s -b base --single-branch "$GLUONDIR/$module" "$PATCHDIR" 2>/dev/null 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" done diff --git a/scripts/update-patches.sh b/scripts/update-patches.sh index cb38c37d..df36a2de 100755 --- a/scripts/update-patches.sh +++ b/scripts/update-patches.sh @@ -11,14 +11,14 @@ GLUONDIR="$(pwd)" for module in $GLUON_MODULES; do echo "--- Updating patches for module '$module' ---" - rm -rf "$GLUONDIR"/patches/"$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 "$GLUONDIR"/patches/"$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" + 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