script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2017 09:40:37 +0000 (10:40 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 12 Jan 2017 14:34:25 +0000 (15:34 +0100)
Pair-Programmed-With: Karolin Seeger <kseeger@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Jan 12 15:34:25 CET 2017 on sn-devel-144

script/release.sh

index 769f742c3f0e50b44310447fe2c6ee66b125b818..b533e2594401e03a3b9f74fc792bb33d9abb078e 100755 (executable)
@@ -830,7 +830,8 @@ announcement_samba_stable() {
                        top=$(cat ${TMPDIR}/WHATSNEW.txt | wc -l)
                }
                local skip=$(cat ${TMPDIR}/WHATSNEW.txt | grep -n '^[^ ]' | head -1 | cut -d ':' -f1)
-               local bottom=$(expr ${top} - \( ${skip} - 1 \))
+               local headlimit=$(expr ${top} - 1 )
+               local taillimit=$(expr ${headlimit} - \( ${skip} - 1 \))
 
                cat "announce.${tagname}.quotation.txt"
                echo ""
@@ -838,7 +839,7 @@ announcement_samba_stable() {
                echo "Release Announcements"
                echo "---------------------"
                echo ""
-               head -${top} ${TMPDIR}/WHATSNEW.txt | tail -${bottom}
+               head -${headlimit} ${TMPDIR}/WHATSNEW.txt | tail -${taillimit}
                echo ""
                echo "================"
                echo "Download Details"