Skip to content

Commit

Permalink
add script for extracting patches
Browse files Browse the repository at this point in the history
Author: Boris Buliga <boris@d12frosted.io>
Committer: Boris Buliga <boris@d12frosted.io>
  • Loading branch information
d12golem committed Dec 4, 2020
1 parent f06492f commit 772def2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions extract_patches
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -e

emacs_plus_root="$1"

if [ ! -d "$emacs_plus_root" ]; then
echo "Please specify emacs-plus root directory"
exit 1
fi

for commit in $(git log --format='%H' --reverse --grep="\[patch\] "); do
message=$(git show -s --format=%B "$commit")
name=${message#"[patch] "}
file="$name.patch"
git format-patch --stdout -1 "$commit" > "$file"
mv "$file" "$emacs_plus_root/patches/$file"
done

0 comments on commit 772def2

Please sign in to comment.