From f172ef91162212858cb4fb93e1ac3f81a7f8c4d4 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 6 Oct 2007 10:38:50 +0000 Subject: [PATCH] Use the Revision: and Modified: lines in the message body to get the revision number and pathname of changed file. --- releasetools/docbook-build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/releasetools/docbook-build b/releasetools/docbook-build index ec331acf5..d531747b5 100755 --- a/releasetools/docbook-build +++ b/releasetools/docbook-build @@ -140,9 +140,12 @@ while getopts ":a:b:e:f:d:hl:p:rst:u:v:x:z:" opt; do r ) # parse commit message while read -r LINE do - if echo $LINE | grep "^Subject: " >/dev/null; then - CHANGEPATH=$(echo $LINE | sed 's/^Subject: SF.net SVN: docbook: \[[^\]\+\]\(.\+\)$/\1/') - REVISION=$(echo $LINE | sed 's/^Subject: SF.net SVN: docbook: \[\([^\]\+\)\].\+$/\1/') + if echo $LINE | grep "^Revision: " >/dev/null; then + REVISION=$(echo $LINE | sed '^s/Revision: \[\([^\]\+\)\]$/\1/') + break + fi + if echo $LINE | grep "^Modified: " >/dev/null; then + CHANGEPATH=$(echo $LINE | sed 's/^Modified: \(.+\)$/\1/') break fi done ;; -- 2.50.1