diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 21:56:19 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 21:56:19 (EDT) |
commit | 4cf7edfba3cbebe179cad589afecb2c9579278ac (patch) | |
tree | a8fbf4687c5993fa93db4a42635606e772807a83 /scripts | |
parent | 44a9b281953bf937f907026076ca9eb72c49be5c (diff) |
scripts/announce-release.sh: Escape heading lines for quoted-printable
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/announce-release.sh | 26 |
1 files changed, 14 insertions, 12 deletions
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/^/ /') |