diff options
Diffstat (limited to 'debian/patch-to-news')
-rwxr-xr-x | debian/patch-to-news | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/patch-to-news b/debian/patch-to-news new file mode 100755 index 0000000..f1f7abc --- /dev/null +++ b/debian/patch-to-news @@ -0,0 +1,23 @@ +#!/bin/bash + +set -eo pipefail + +patch="$1" + +sed ' + # delete everything after the first line starting with "--- " (the diff) + /^--- [^ ]/,$d' < "$patch" \ +| tac \ +| sed ' + # delete everything up to the first line containing only "---" (the diffstat) + 1,/^---$/d' \ +| tac \ +| sed ' + # delete everything before the first blank line (git summary line) + 1,/^$/d' \ +| sed ' + # convert to our README.Debian NEWS format + 1 s/^/* / + 2,$ s/^/ /' + +echo " Patch: $(basename $patch)" |