meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit 9a0c55962d323e3111b14fce0bca2e82b7c08b1f
parent 211c7f306caf378f3abd5558c92d1dd052aa9b0d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 23 Feb 2022 15:31:08 +0100

solstice: update build process

Remove intermediary "release notes" files.

Diffstat:
Msolstice/Makefile | 28++++++----------------------
Msolstice/solstice_build.sh | 22+++++++++++++++++-----
2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/solstice/Makefile b/solstice/Makefile @@ -81,11 +81,7 @@ build_all: $(HTML) man clean: @echo "Cleaning generated files" @rm -rf man - @rm -f .sig .chk .man \ - solstice-release-notes.html.in \ - solstice-pp-release-notes.html.in \ - $(HTML) \ - $(HTML:=.err) + @rm -f .sig .chk .man $(HTML) $(HTML:=.err) distclean: clean @echo "Cleaning PGP signatures and extracted files" @@ -94,7 +90,7 @@ distclean: clean $(SOLPP_SIG) \ $(MAN) \ $(SOLPP_README) \ - $(SOLSTICE_README) \ + $(SOLSTICE_README) install: build @rsync -avzrR --delete-after --progress \ @@ -117,15 +113,9 @@ solstice.html: solstice.html.in themis.png solstice_build.sh Makefile ################################################################################ # Downloads web page ################################################################################ -solstice-downloads.html: $(SOLSTICE_SIG) \ - solstice-release-notes.html.in \ - solstice_build.sh +solstice-downloads.html: $(SOLSTICE_SIG) $(SOLSTICE_README) solstice_build.sh @echo "Building $@" - @sh solstice_build.sh downloads > $@ - -solstice-release-notes.html.in: $(SOLSTICE_README) - @$(MARKDOWN) $(SOLSTICE_README) \ - | sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' | sed '$$d' > $@ + @sh solstice_build.sh downloads $(SOLSTICE_README) > $@ $(SOLSTICE_README) $(MAN): @echo "Extracting data from $(SOLSTICE_ARCH)" @@ -134,18 +124,12 @@ $(SOLSTICE_README) $(MAN): ################################################################################ # Additional resources ################################################################################ -solstice-resources.html: $(SOLPP_SIG) \ +solstice-resources.html: $(SOLPP_SIG) $(SOLPP_README) \ solstice-abg.html.in \ solstice-pp.html.in \ - solstice-pp-release-notes.html.in \ solstice_build.sh @echo "Building $@" - @sh solstice_build.sh resources $(SOLPP_VERSION) > $@ - -solstice-pp-release-notes.html.in: $(SOLPP_README) - @$(MARKDOWN) $(SOLPP_README) \ - | sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' \ - | sed -e '$$d' -e 's/\<h3\>/h4/g' > $@ + @sh solstice_build.sh resources $(SOLPP_README) $(SOLPP_VERSION) > $@ $(SOLPP_README): @echo "Extracting $@ from $(SOLPP_ARCH)" diff --git a/solstice/solstice_build.sh b/solstice/solstice_build.sh @@ -33,10 +33,18 @@ overview() # Build the downloads page downloads() { + if [ $# -lt 1 ]; then + printf "Usage: %s downloads <readme>\n" "$0" >&2 + exit 1 + fi + + release_notes=$(${markdown} "$1" \ + | sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' | sed '$d') + print_header Solstice Downloads echo "<header><h1>Download Solstice</h1></header>" print_downloads Solstice - cat solstice-release-notes.html.in + echo "${release_notes}" print_footer } @@ -69,18 +77,22 @@ print_pp_downloads() # Build the resources page resources() { - if [ $# -lt 1 ]; then - printf "Usage: %s resources <version>\n" "$0" >&2 + if [ $# -lt 2 ]; then + printf "Usage: %s resources <solpp-readme> <solpp-version>\n" "$0" >&2 exit 1 fi + solpp_release_notes=$(${markdown} "$1" \ + | sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' \ + | sed -e '$d' -e 's/\<h3\>/h4/g') + print_header Solstice Resources echo "<header><h1>Additional resources</h1></header>" cat solstice-abg.html.in - VERSION=$1 envsubst < solstice-pp.html.in + VERSION=$2 envsubst < solstice-pp.html.in echo "<h3>Download Post-Processes</h3>" print_pp_downloads - cat solstice-pp-release-notes.html.in + echo "${solpp_release_notes}" print_footer }