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