From f1c0d6b40e2c0f64eb78cbde7e2f1169dc8875bd Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Fri, 29 Jul 2022 14:42:23 -0400 Subject: [PATCH] Apply #10 --- make.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/make.sh b/make.sh index c8470b2..f62343c 100644 --- a/make.sh +++ b/make.sh @@ -131,6 +131,30 @@ recipe_release() { fi } +recipe_patch() { + if [ -z "$MXID" ]; then + MXID="@${USER}:$(hostname)" + fi + + if [ -z "$DISPLAY_NAME" ]; then + DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1) + fi + + if [ -z "$EDITOR" ]; then + EDITOR=vi + fi + + ( + printf 'From: "%s" <%s>\n' "$DISPLAY_NAME" "$MXID" + echo "Date: $(date +%Y-%m-%d)" + echo "Subject: " + echo + cvs diff -uNp $PATCH | grep -v '^\? ' + ) > "telodendria-patch.patch" + + "$EDITOR" "telodendria-patch.patch" +} + for recipe in $@; do recipe_$recipe done