From 1746366bcab3c6f02c556943f3f41e6d85c7717f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 02 Sep 2014 09:42:07 -0400 Subject: scripts/announce-release.sh: Generalize sed code --- (limited to 'scripts') diff --git a/scripts/announce-release.sh b/scripts/announce-release.sh index d013337..a718cc6 100755 --- a/scripts/announce-release.sh +++ b/scripts/announce-release.sh @@ -5,9 +5,24 @@ version="${2}" package_name="${3}" srcdir="${0%/scripts/announce-release.sh}" -about="$(sed -n '4,${ /^Copyright/q; p; }' "${srcdir}/README")" -news="$(sed -n '6,${ /^ProteanOS Development Kit/q; /^Copyright/q; p; }' \ - "${srcdir}/NEWS")" +about="$(sed -n ' + H; + ${ + g; + s/^\n*[^\n][^\n]*\n[=-][=-]*\n\n*//; + s/\n*[^\n][^\n]*\n[=-][=-]*\n.*$//; + p; + }; + ' "${srcdir}/README")" +news="$(sed -n ' + H; + ${ + g; + s/^\n*[^\n][^\n]*\n[=-][=-]*\n\n*//; + s/\n*[^\n][^\n]*\n[=-][=-]*\n.*$//; + p; + }; + ' "${srcdir}/NEWS")" /usr/sbin/sendmail \ -f pj+proteanos-ml@pehjota.net proteanos-dev@lists.proteanos.com <<-EOF -- cgit v0.9.1