commit 07783674a0c6fe2be534ed37137e7fe39524fc38
parent ad73953ce502f4b1aee31dfa85256256221491ec
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 21 Feb 2022 18:18:49 +0100
stardis: update stardis_build.sh
Build routines do not directly create files but print their contents on
stdout.
Diffstat:
2 files changed, 96 insertions(+), 104 deletions(-)
diff --git a/stardis/Makefile b/stardis/Makefile
@@ -107,6 +107,9 @@ distclean: clean
$(STARDIS_ARCH_FILES) \
$(STARTER_PACK_README)
+stardis_build.sh: ../meso-menu.sh
+ @touch $@
+
################################################################################
# Stardis web page
################################################################################
@@ -114,21 +117,20 @@ stardis.html: \
stardis.html.in \
$(OVERVIEW_IMG) \
stardis_build.sh \
- ../meso-menu.sh \
Makefile
@echo "Building $@"
- @sh stardis_build.sh overview $(STARDIS_VERSION)
+ @sh stardis_build.sh overview $(STARDIS_VERSION) > $@
################################################################################
# Consortium web pages
################################################################################
consortium-fr.html: consortium-fr.html.in edf_logo.svg stardis_build.sh
@echo "Building $@"
- @sh stardis_build.sh consortium fr
+ @sh stardis_build.sh consortium fr > $@
consortium-en.html: consortium-en.html.in edf_logo.svg stardis_build.sh
@echo "Building $@"
- @sh stardis_build.sh consortium en
+ @sh stardis_build.sh consortium en > $@
################################################################################
# Download web pages
@@ -137,10 +139,9 @@ stardis-downloads.html: $(STARDIS_SIG)\
stardis-release-notes.html.in \
stardis-green-release-notes.html.in \
stardis-solver-release-notes.html.in \
- stardis_build.sh \
- ../meso-menu.sh
+ stardis_build.sh
@echo "Building $@"
- @sh stardis_build.sh downloads
+ @sh stardis_build.sh downloads > $@
stardis-release-notes.html.in: $(STARDIS_README)
@$(MARKDOWN) $(STARDIS_README) \
@@ -169,10 +170,9 @@ starter-pack.html: \
$(STARTER_PACK_SIG) \
$(STARTER_PACK_README) \
stardis_build.sh \
- ../meso-menu.sh \
Makefile
@echo "Building $@"
- @sh stardis_build.sh starter_pack $(STARTER_PACK_README) $(STARTER_PACK_VERSION)
+ @sh stardis_build.sh starter_pack $(STARTER_PACK_README) $(STARTER_PACK_VERSION) > $@
$(STARTER_PACK_README):
@echo "Extracting data from $(STARTER_PACK_ARCH)"
diff --git a/stardis/stardis_build.sh b/stardis/stardis_build.sh
@@ -24,11 +24,9 @@ overview()
exit 1
fi
- {
- print_header Stardis Overview
- VERSION=$1 envsubst < stardis.html.in
- print_footer
- } > stardis.html
+ print_header Stardis Overview
+ VERSION=$1 envsubst < stardis.html.in
+ print_footer
}
consortium()
@@ -38,42 +36,38 @@ consortium()
exit 1
fi
- {
- print_header Stardis Consortium "$1"
- cat "consortium-$1.html.in"
- print_footer
- } > "consortium-$1.html"
+ print_header Stardis Consortium "$1"
+ cat "consortium-$1.html.in"
+ print_footer
}
downloads()
{
- {
- print_header Stardis Downloads
- echo '<header><h1>Download Stardis</h1></header>'
-
- echo "<p>The proposed archives contain precompiled version of the <a"
- echo "href=\"https://gitlab.com/meso-star/stardis-solver.git\">Stardis-Solver</a>"
- echo "library and of the <a href=\"./man/man1/stardis.1.html\">stardis</a>"
- echo "and <a href=\"./man/man1/sgreen.1.html\">sgreen</a> command line"
- echo "tools. Refer below for their associated release notes. The version of"
- echo "the archive corresponds to the version number of the Stardis-Solver"
- echo "library packaged into the archive.</p>"
-
- print_downloads Stardis "Linux"
- echo "<h2>Stardis-Solver Library release notes</h2>"
- cat stardis-solver-release-notes.html.in
- echo "<h2>Stardis CLI release notes</h2>"
- cat stardis-release-notes.html.in
- echo "<h2>Stardis-Green CLI release notes</h2>"
- cat stardis-green-release-notes.html.in
- print_footer
-} > stardis-downloads.html
+ print_header Stardis Downloads
+ echo '<header><h1>Download Stardis</h1></header>'
+
+ echo "<p>The proposed archives contain precompiled version of the <a"
+ echo "href=\"https://gitlab.com/meso-star/stardis-solver.git\">Stardis-Solver</a>"
+ echo "library and of the <a href=\"./man/man1/stardis.1.html\">stardis</a>"
+ echo "and <a href=\"./man/man1/sgreen.1.html\">sgreen</a> command line"
+ echo "tools. Refer below for their associated release notes. The version of"
+ echo "the archive corresponds to the version number of the Stardis-Solver"
+ echo "library packaged into the archive.</p>"
+
+ print_downloads Stardis "Linux"
+ echo "<h2>Stardis-Solver Library release notes</h2>"
+ cat stardis-solver-release-notes.html.in
+ echo "<h2>Stardis CLI release notes</h2>"
+ cat stardis-release-notes.html.in
+ echo "<h2>Stardis-Green CLI release notes</h2>"
+ cat stardis-green-release-notes.html.in
+ print_footer
}
starter_pack()
{
if [ $# -lt 1 ]; then
- printf "Usage: %s starter_pack <README> <VERSION>\n" "$0" >&2
+ printf "Usage: %s starter_pack <readme> <version>\n" "$0" >&2
exit 1
fi
@@ -91,69 +85,67 @@ starter_pack()
| sed -n '/^<h2>Copyright notice<\/h2>/,$p' \
| sed 's/opyright (C)/opyright \©/g')
- {
- print_header Stardis Starter-Pack
-
- echo "<header>"
- echo " <h1>Stardis: Starter Pack</h1>"
- echo "</header>"
- echo "<div class=\"news\">"
- echo " <p><b>Stardis: Starter Pack $2</b></p>"
- echo " <ul>"
- echo " <li><a href=\"downloads/Stardis-Starter-Pack-$2.tar.gz\">tarball</a> /"
- echo " <a href=\"downloads/Stardis-Starter-Pack-$2.tar.gz.sig\">pgp</a></li>"
- echo " </ul>"
- echo "</div>"
-
- echo "${intro}"
-
- echo "<h2>Content</h2>"
- echo "<div class=\"img\" style=\"padding-top:3em; width: 17em\">"
- echo " <a href=\"heatsink.jpg\"><img src=\"heatsink.jpg\" alt=\"heatsink\"></a>"
- echo " <a href=\"heatsinkx50.jpg\"><img src=\"heatsinkx50.jpg\" alt=\"heatsinkx50\"></a>"
- echo " <a href=\"foam.jpg\"><img src=\"foam.jpg\" alt=\"foam\"></a>"
- echo " <a href=\"city.jpg\"><img src=\"city.jpg\" alt=\"city\"></a>"
- echo " <div class=\"caption\">"
- echo " Geometries of the heatsink, the multiple heatsinks, the foam, and the city"
- echo " provided by the Starter Pack and used in its examples."
- echo " </div>"
- echo "</div>"
-
- echo "${content1}"
-
- echo "<div class=\"img\" style=\"padding-top:3em; width: 16em\">"
- echo " <a href=\"IR_rendering_1080x720x128.jpg\">"
- echo " <img src=\"IR_rendering_1080x720x128.jpg\" alt=\"foam_ir\">"
- echo " </a>"
- echo " <a href=\"IR_animation_1080x720x32x128.gif\">"
- echo " <img src=\"IR_animation_1080x720x32x128_thumb.gif\" alt=\"foam_anim\">"
- echo " </a>"
- echo " <div class=\"caption\">"
- echo " Illustration of the infrared rendering of the porous example. The"
- echo " color map displays the temperature in Kelvin."
- echo " The bottom animation was produced by a simple"
- echo " rotation of the camera around the center of the foam."
- echo " Each one of the 32 frames is a full image produced by"
- echo " a Stardis run."
- echo " </div>"
- echo "</div>"
-
- echo "<div class=\"img\" style=\"padding-top:3em; width: 16em\">"
- echo " <a href=\"IR_city_640x480x1024_273-275.png\">"
- echo " <img src=\"IR_city_640x480x1024_273-275.png\" alt=\"city_ir\">"
- echo " </a>"
- echo " <div class=\"caption\">"
- echo " The infrared rendering of the city example. The color map displays the"
- echo " temperature in Kelvin. The image consists of 640x480 independent"
- echo " Monte-Carlo estimates (one per pixel, 1024 paths each)."
- echo " </div>"
- echo "</div>"
-
- echo "${content2}"
- echo "${license}"
-
- print_footer
- } > starter-pack.html
+ print_header Stardis Starter-Pack
+
+ echo "<header>"
+ echo " <h1>Stardis: Starter Pack</h1>"
+ echo "</header>"
+ echo "<div class=\"news\">"
+ echo " <p><b>Stardis: Starter Pack $2</b></p>"
+ echo " <ul>"
+ echo " <li><a href=\"downloads/Stardis-Starter-Pack-$2.tar.gz\">tarball</a> /"
+ echo " <a href=\"downloads/Stardis-Starter-Pack-$2.tar.gz.sig\">pgp</a></li>"
+ echo " </ul>"
+ echo "</div>"
+
+ echo "${intro}"
+
+ echo "<h2>Content</h2>"
+ echo "<div class=\"img\" style=\"padding-top:3em; width: 17em\">"
+ echo " <a href=\"heatsink.jpg\"><img src=\"heatsink.jpg\" alt=\"heatsink\"></a>"
+ echo " <a href=\"heatsinkx50.jpg\"><img src=\"heatsinkx50.jpg\" alt=\"heatsinkx50\"></a>"
+ echo " <a href=\"foam.jpg\"><img src=\"foam.jpg\" alt=\"foam\"></a>"
+ echo " <a href=\"city.jpg\"><img src=\"city.jpg\" alt=\"city\"></a>"
+ echo " <div class=\"caption\">"
+ echo " Geometries of the heatsink, the multiple heatsinks, the foam, and the city"
+ echo " provided by the Starter Pack and used in its examples."
+ echo " </div>"
+ echo "</div>"
+
+ echo "${content1}"
+
+ echo "<div class=\"img\" style=\"padding-top:3em; width: 16em\">"
+ echo " <a href=\"IR_rendering_1080x720x128.jpg\">"
+ echo " <img src=\"IR_rendering_1080x720x128.jpg\" alt=\"foam_ir\">"
+ echo " </a>"
+ echo " <a href=\"IR_animation_1080x720x32x128.gif\">"
+ echo " <img src=\"IR_animation_1080x720x32x128_thumb.gif\" alt=\"foam_anim\">"
+ echo " </a>"
+ echo " <div class=\"caption\">"
+ echo " Illustration of the infrared rendering of the porous example. The"
+ echo " color map displays the temperature in Kelvin."
+ echo " The bottom animation was produced by a simple"
+ echo " rotation of the camera around the center of the foam."
+ echo " Each one of the 32 frames is a full image produced by"
+ echo " a Stardis run."
+ echo " </div>"
+ echo "</div>"
+
+ echo "<div class=\"img\" style=\"padding-top:3em; width: 16em\">"
+ echo " <a href=\"IR_city_640x480x1024_273-275.png\">"
+ echo " <img src=\"IR_city_640x480x1024_273-275.png\" alt=\"city_ir\">"
+ echo " </a>"
+ echo " <div class=\"caption\">"
+ echo " The infrared rendering of the city example. The color map displays the"
+ echo " temperature in Kelvin. The image consists of 640x480 independent"
+ echo " Monte-Carlo estimates (one per pixel, 1024 paths each)."
+ echo " </div>"
+ echo "</div>"
+
+ echo "${content2}"
+ echo "${license}"
+
+ print_footer
}
"$@"