From d562d815b5b35d2856c8a10ce87cc87cfa5fa151 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Feb 2021 16:48:50 +0100 Subject: [PATCH] Add tool to produce diff of markdown --- tools/md-diff.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 tools/md-diff.sh diff --git a/tools/md-diff.sh b/tools/md-diff.sh new file mode 100755 index 00000000..83cc6bcc --- /dev/null +++ b/tools/md-diff.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# md-diff +# arguments: file commit commit [diff tool with args] + +if [ $# -lt 3 ]; then + echo 'arguments: file commit commit [diff tool with args]' >&2 + exit 1; +fi + +${4:-diff} \ + <(git show "$2:$1" | ${0%/*}/xep2md.sh -) \ + <(git show "$3:$1" | ${0%/*}/xep2md.sh -)