From: Stefan Metzmacher Date: Thu, 12 Jan 2017 09:40:37 +0000 (+0100) Subject: script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b514cfe322e28837374836762eb9535256f229c;p=thirdparty%2Fsamba.git script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation Pair-Programmed-With: Karolin Seeger Signed-off-by: Stefan Metzmacher Signed-off-by: Karolin Seeger Autobuild-User(master): Karolin Seeger Autobuild-Date(master): Thu Jan 12 15:34:25 CET 2017 on sn-devel-144 (cherry picked from commit 7870c645b79da647bae45b4dc95e7d6e9abcd91a) --- diff --git a/script/release.sh b/script/release.sh index da973b5085c..7e28b6bd7d5 100755 --- a/script/release.sh +++ b/script/release.sh @@ -790,7 +790,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 "" @@ -798,7 +799,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"