From 4cf7edfba3cbebe179cad589afecb2c9579278ac Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 18 Mar 2019 21:56:19 -0400 Subject: scripts/announce-release.sh: Escape heading lines for quoted-printable --- diff --git a/scripts/announce-release.sh b/scripts/announce-release.sh index dc0b35f..7b0f0c1 100755 --- a/scripts/announce-release.sh +++ b/scripts/announce-release.sh @@ -17,6 +17,15 @@ version="${2}" package_name="${3}" srcdir="${0%/scripts/announce-release.sh}" +heading() +{ + local name="${1}" + shift 1 + + printf '%s\n' "${name}" + printf '%s\n' "${name}" | sed 's/./=3D/g' +} + about="$(sed -n ' H; ${ @@ -46,13 +55,11 @@ message="$(cat <<-EOF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable - About - ===== + $(heading 'About') ${about} - Downloading - =========== + $(heading 'Downloading') Source archives are available from the files site by HTTP or FTP: @@ -74,21 +81,16 @@ message="$(cat <<-EOF This release is marked by the "${package}/${version}" tag. - NEWS for Version ${version} - =================$(printf '%s\n' "${version}" | sed 's/./=/g') + $(heading "NEWS for Version ${version}") ${news} - Shortlog of Changes Since Version ${old_version} - ==================================$(printf '%s\n' "${old_version}" | \ - sed 's/./=/g') + $(heading "Shortlog of Changes Since Version ${old_version}") $(git shortlog "${old_tag}..HEAD" | \ sed '/^..*$/s/^/ /') - Diffstat of Changes Since Version ${old_version} - ==================================$(printf '%s\n' "${old_version}" | \ - sed 's/./=/g') + $(heading "Diffstat of Changes Since Version ${old_version}") $(git diff --stat=69 --color=never --find-renames=50% \ "${old_tag}..HEAD" | sed 's/^/ /') -- cgit v0.9.1