From b75194f5e3b4cb74335c1373df12da504dfebeb2 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Dec 2016 16:45:13 -0700 Subject: [PATCH] Output results to the console instead. --- doc/news/changes/create_changes_h.sh | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/doc/news/changes/create_changes_h.sh b/doc/news/changes/create_changes_h.sh index a68dbfd79b..4f1c30df8a 100755 --- a/doc/news/changes/create_changes_h.sh +++ b/doc/news/changes/create_changes_h.sh @@ -20,7 +20,8 @@ # # The script needs to be executed as # ./create_changes_h.sh -# from ./doc/news/changes. +# from ./doc/news/changes. It simply outputs its results to the console, +# from where the text can be captured to a file. @@ -29,36 +30,34 @@ if test ! -d incompatibilities -o ! -d major -o ! -d minor ; then exit 1 fi -OUTPUT="../changes.h.new" function process_directory { - echo "
    " >> ${OUTPUT} + echo "
      " # process all entries in the right order ARRAY=($(ls "$1" | sort -r)) for f in "${ARRAY[@]}"; do - echo "" >> ${OUTPUT} - echo -n "
    1. " >> ${OUTPUT} + echo "" + echo -n "
    2. " # indent lines by one blank space - sed 's/^[ ]*/ /' "$1"/"$f" >> ${OUTPUT} - echo "
    3. " >> ${OUTPUT} + sed 's/^[ ]*/ /' "$1"/"$f" + echo " " done - echo "" >> ${OUTPUT} - echo "
    " >> ${OUTPUT} + echo "" + echo "
" } -cat header > ${OUTPUT} -echo INCOMPATIBILITIES -cat header_incompatibilities >> ${OUTPUT} + +cat header + +cat header_incompatibilities process_directory incompatibilities -echo GENERAL -cat header_major >> ${OUTPUT} +cat header_major process_directory major -echo SPECIFIC -cat header_minor >> ${OUTPUT} +cat header_minor process_directory minor -cat footer >> ${OUTPUT} +cat footer -- 2.39.5