commit c63304c2210c085f4d7d3131735a6ea76e4977c0
parent a669ed8e3ead892b6b685aed38ece2f2b8431058
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 26 Aug 2025 12:41:54 +0200
Stardis: use the new compilation procedure
Add the section to the menu.tsv file.
Add the index.tsv file corresponding to the section.
Write hooks to extract the contents of the archives, sign the
downloadable content, and generate the HTML code for the manual pages
with the updated convert_mdoc.sh script.
Write shell scripts for dynamic content.
Diffstat:
17 files changed, 390 insertions(+), 449 deletions(-)
diff --git a/menu.tsv b/menu.tsv
@@ -3,4 +3,4 @@ A.R.T art
htrdr htrdr
Schiff schiff
Solstice solstice
-#Stardis stardis
+Stardis stardis
diff --git a/scripts/generate_header.sh b/scripts/generate_header.sh
@@ -22,36 +22,6 @@ set -e
########################################################################
# Helper functions
########################################################################
-# Print the absolute dir of the input file
-absdir() # file
-{
- if [ -d "$1" ]; then
- cd -- "$1" || exit 1
- else
- cd -- "$(dirname "$1")" || exit 1
- fi
- echo "${PWD}"
- cd "${OLDPWD}" || exit 1
-}
-
-# Print relative path from input file to a dir
-relpath_to_dir() # file, dir
-(
- # Build directory from worktree to path
- _dir0="$(absdir "$1")"
- _dir1="$(absdir "$2")"
- _dir0="$(printf '%s\n' "${_dir0}" | sed "s;^${_dir1}[/]\{0,\};;g")"
-
- # Ensure that the directory is a subpath of the worktree
- if ! [ -d "${_dir0}" ]; then
- return 1
- fi
-
- echo "${_dir0}" | sed 's/\//\n/g' | while read -r _i; do
- printf "../"
- done
-)
-
# List the indexed content in TSV format. Each line contains the index
# label, followed by the indexed content, and possibly an indicator of
# the language used.
diff --git a/scripts/meso-web.sh b/scripts/meso-web.sh
@@ -147,3 +147,36 @@ print_downloads() # section, archive_prefix, OS ...
printf '</table>\n'
printf '\n'
)
+
+# Print the absolute dir of the input file
+absdir() # file
+{
+ if [ -d "$1" ]; then
+ cd -- "$1" || exit 1
+ else
+ cd -- "$(dirname "$1")" || exit 1
+ fi
+ echo "${PWD}"
+ cd "${OLDPWD}" || exit 1
+}
+
+# Print relative path from input file to a dir
+relpath_to_dir() # file, dir
+(
+ # Build directory from worktree to path
+ _dir0="$(absdir "$1")"
+ _dir1="$(absdir "$2")"
+
+ _dir0="$(printf '%s\n' "${_dir0}" | sed "s;^${_dir1}[/]\{0,\};;g")"
+
+ # Ensure that the directory is a subpath of the worktree
+ if ! [ -d "${_dir1}/${_dir0}" ]; then
+ >&2 printf '%s: %s is not a subdirectory of %s\n' \
+ "$0" "${_dir0}" "${_dir1}"
+ return 1
+ fi
+
+ echo "${_dir0}" | sed 's/\//\n/g' | while read -r _i; do
+ printf "../"
+ done
+)
diff --git a/stardis/Makefile b/stardis/Makefile
@@ -1,253 +0,0 @@
-# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-.POSIX:
-
-include ../config.mk
-
-SOLVER_VERSION=0.16.1
-STARDIS_VERSION=0.11.1
-SGREEN_VERSION=0.5.1
-STARTER_PACK_VERSION=0.2.0
-
-STARDIS_DIR=Stardis-$(SOLVER_VERSION)-GNU-Linux64
-STARDIS_ARCH=downloads/$(STARDIS_DIR).tar.gz
-STARDIS_README=$(STARDIS_DIR)/share/doc/stardis/README.md
-STARDIS_GREEN_README=$(STARDIS_DIR)/share/doc/stardis-green/README.md
-STARDIS_SOLVER_README=$(STARDIS_DIR)/share/doc/stardis-solver/README.md
-
-STARTER_PACK_DIR=Stardis-Starter-Pack-$(STARTER_PACK_VERSION)
-STARTER_PACK_ARCH=downloads/$(STARTER_PACK_DIR).tar.gz
-STARTER_PACK_README=$(STARTER_PACK_DIR)/README.md
-STARTER_PACK_PKG=\
- ./downloads/Stardis-Starter-Pack-0.2.0.tar.gz\
- ./downloads/Stardis-Starter-Pack-0.1.0.tar.gz\
- ./downloads/Stardis-Starter-Pack-0.0.0.tar.gz
-STARTER_PACK_SIG=$(STARTER_PACK_PKG:=.sig)
-
-MAN=\
- $(STARDIS_DIR)/share/man/man1/stardis.1\
- $(STARDIS_DIR)/share/man/man5/stardis-input.5\
- $(STARDIS_DIR)/share/man/man5/stardis-output.5\
- $(STARDIS_DIR)/share/man/man1/sgreen.1\
- $(STARDIS_DIR)/share/man/man5/sgreen-input.5\
- $(STARDIS_DIR)/share/man/man5/sgreen-output.5
-STARDIS_ARCH_FILES=\
- $(STARDIS_README)\
- $(STARDIS_GREEN_README)\
- $(STARDIS_SOLVER_README)\
- $(MAN)
-
-# images/pulse.svg
-# images/sin.svg
-# images/step.svg
-OVERVIEW_IMG=\
- images/foam_path.jpg\
- images/heatsink_anim.gif\
- images/plot_insensib_MC.jpg\
- images/ramier_island_sun.png\
- thumbs/foam_path.jpg\
- thumbs/heatsink_anim.gif\
- thumbs/plot_insensib_MC.jpg\
- thumbs/ramier_island_sun.jpg
-
-STARTER_PACK_IMG=\
- images/city.jpg\
- images/foam.jpg\
- images/heatsink.jpg\
- images/heatsinkx50.jpg\
- images/IR_rendering_1080x720x128.jpg\
- images/IR_animation_1080x720x32x128.gif\
- images/IR_city_640x480x1024_273-275.png\
- thumbs/city.jpg\
- thumbs/foam.jpg\
- thumbs/heatsink.jpg\
- thumbs/heatsinkx50.jpg\
- thumbs/IR_rendering_1080x720x128.jpg\
- thumbs/IR_animation_1080x720x32x128.gif\
-
-VALIDATION_IMG=\
- images/geometry.svg\
- images/temperature.png\
- images/TprofX.png\
- images/TprofY.png
-
-CONSORTIUM_IMG=\
- images/airbus_logo.svg\
- images/edf_logo.svg
-
-HTML=\
- consortium-fr.html\
- consortium-en.html\
- release-notes.html\
- sgreen-release-notes.html\
- stardis.html\
- stardis-docs.html\
- stardis-solver-release-notes.html\
- stardis-release-notes.html\
- starter-pack.html\
- validation.html
-
-build: .sig .man
- $(MAKE) -fMakefile -f .sig -f .man build_all
-
-build_all: $(HTML) man
-
-clean:
- @echo "Cleaning generated files"
- @rm -rf man
- @rm -f .sig .man .lint\
- stardis-release-notes.*\
- sgreen-release-notes.*\
- starter-pack.md\
- stardis-solver-release-notes.*\
- $(HTML)\
- $(HTML:=.err)
-
-distclean: clean
- @echo "Cleaning PGP signatures and extracted files"
- @rm -f \
- $(STARTER_PACK_SIG)\
- $(STARDIS_ARCH_FILES)\
- $(STARTER_PACK_README)
-
-install: build
- @rsync -avzrR --delete-after --progress\
- $(HTML)\
- $(OVERVIEW_IMG)\
- $(CONSORTIUM_IMG)\
- $(STARTER_PACK_IMG)\
- $(STARTER_PACK_PKG)\
- $(STARTER_PACK_SIG)\
- $(VALIDATION_IMG)\
- $$(find man -name "*.html")\
- $(PREFIX)/stardis/
-
-stardis_build.sh: ../meso-menu.sh
- @touch $@
-
-################################################################################
-# Stardis web page
-################################################################################
-stardis.html: stardis.md $(OVERVIEW_IMG) stardis_build.sh Makefile
- @echo "Building $@"
- @$(SHELL) stardis_build.sh overview \
- $(SOLVER_VERSION) $(STARDIS_VERSION) $(SGREEN_VERSION) > $@
-
-################################################################################
-# Validation web page
-################################################################################
-validation.html: validation.md $(VALIDATION_IMG) stardis_build.sh Makefile
- @echo "Building $@"
- @$(SHELL) stardis_build.sh validation > $@
-
-################################################################################
-# Consortium web pages
-################################################################################
-consortium-fr.html: consortium-fr.md $(CONSORTIUM_IMG) stardis_build.sh Makefile
- @echo "Building $@"
- @$(SHELL) stardis_build.sh consortium fr > $@
-
-consortium-en.html: consortium-en.md $(CONSORTIUM_IMG) stardis_build.sh Makefile
- @echo "Building $@"
- @$(SHELL) stardis_build.sh consortium en > $@
-
-################################################################################
-# Reference documentation
-################################################################################
-stardis-docs.html: stardis-docs.md stardis_build.sh
- @echo "Building $@"
- @$(SHELL) stardis_build.sh documentations > $@
-
-################################################################################
-# Release notes
-################################################################################
-release-notes.html: release-notes.md stardis_build.sh
- @echo "Building $@"
- @$(SHELL) stardis_build.sh release_notes_list > $@
-
-stardis-release-notes.md: $(STARDIS_README)
-stardis-solver-release-notes.md: $(STARDIS_SOLVER_README)
-sgreen-release-notes.md: $(STARDIS_GREEN_README)
-
-stardis-release-notes.html: stardis-release-notes.md
-stardis-solver-release-notes.html: stardis-solver-release-notes.md
-sgreen-release-notes.html: sgreen-release-notes.md
-
-stardis-release-notes.md \
-stardis-solver-release-notes.md \
-sgreen-release-notes.md:
- @echo "Building $@"
- @case "$@" in \
- stardis-solver*) dir="stardis-solver" ;; \
- stardis*) dir="stardis" ;; \
- sgreen*) dir="stardis-green" ;; \
- *) exit 1 ;; \
- esac; \
- readme="$(STARDIS_DIR)/share/doc/$${dir}/README.md"; \
- { sed -n '/^# /p' "$${readme}"; \
- sed -n '/^## Release notes/,/^## License/p' "$${readme}" \
- | sed -e '1d' -e '$$d' -e 's/^#//'; \
- } > $@
-
-stardis-release-notes.html \
-stardis-solver-release-notes.html \
-sgreen-release-notes.html:
- @echo "Building $@"
- @$(SHELL) stardis_build.sh release_notes "$@" > $@
-
-$(STARDIS_ARCH_FILES):
- @echo "Extracting data from $(STARDIS_ARCH)"
- @tar -xz -f $(STARDIS_ARCH) $(STARDIS_ARCH_FILES)
-
-################################################################################
-# Starter pack web pages
-################################################################################
-starter-pack.html: starter-pack.md stardis_build.sh
- @echo "Building $@"
- @$(SHELL) stardis_build.sh starter_pack2 < starter-pack.md > $@
-
-starter-pack.md: $(STARTER_PACK_README) $(STARTER_PACK_IMG) stardis_build.sh
- @$(SHELL) stardis_build.sh starter_pack \
- "$(STARTER_PACK_README)" "$(STARTER_PACK_VERSION)" > $@
-
-$(STARTER_PACK_README):
- @echo "Extracting data from $(STARTER_PACK_ARCH)"
- @tar -xz -f $(STARTER_PACK_ARCH) $(STARTER_PACK_README)
-
-################################################################################
-# Check files
-################################################################################
-lint: build .lint
- @$(MAKE) -fMakefile -f .lint lint_all
-
-lint_all: lint_shells $(HTML:=.lint)
-
-lint_shells:
- @echo "Checking stardis_build.sh" && shellcheck -o all -x stardis_build.sh
-
-################################################################################
-# Miscellaneous targets
-################################################################################
-.sig: Makefile ../configure_targets.sh
- @echo "Setup .sig"
- @$(SHELL) ../configure_targets.sh sig $(STARTER_PACK_PKG) > .sig
-
-.lint: Makefile ../configure_targets.sh
- @echo "Setup .lint"
- @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
-
-.man: Makefile ../configure_targets.sh
- @echo "Setup .man"
- @$(SHELL) ../configure_targets.sh mdoc Stardis $(MAN) > $@
diff --git a/stardis/config.sh.in b/stardis/config.sh.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+stardis_version="0.11.1"
+solver_version="0.16.1"
+sgreen_version="0.5.1"
+spk_version="0.2.0"
+
+stardis_dir="Stardis-${solver_version}-GNU-Linux64"
+stardis_arch="downloads/${stardis_dir}.tar.gz"
+stardis_readme="${stardis_dir}/share/doc/stardis/README.md"
+solver_readme="${stardis_dir}/share/doc/stardis-solver/README.md"
+sgreen_readme="${stardis_dir}/share/doc/stardis-green/README.md"
+
+spk_dir="Stardis-Starter-Pack-${spk_version}"
+spk_arch="downloads/${spk_dir}.tar.gz"
+spk_readme="${spk_dir}/README.md"
+
+########################################################################
+# Helper function
+########################################################################
+release_notes() # readme_file
+{
+ cd ..
+
+ # Project name
+ sed -n '/^# /{p;q;}' "${OLDPWD}/$1"
+
+ # Extract and post-process the release notes
+ sed -n '/^## Release notes/,/^## License/p' "${OLDPWD}/$1" \
+ | sed -e '1d' -e '$d' -e 's/^#//'
+
+ cd "${OLDPWD}"
+}
diff --git a/stardis/hooks/00-extract-archive.sh b/stardis/hooks/00-extract-archive.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+. "./config.sh.in"
+
+>&2 printf 'Extracting %s\n' "${stardis_arch}"
+tar -xz -f "${stardis_arch}" \
+ "${stardis_dir}/share/man" \
+ "${stardis_readme}" \
+ "${solver_readme}" \
+ "${sgreen_readme}"
+
+>&2 printf 'Extracting %s\n' "${spk_arch}"
+tar -xz -f "${spk_arch}" "${spk_readme}"
diff --git a/stardis/hooks/01-generate-man.sh b/stardis/hooks/01-generate-man.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+. "../scripts/meso-web.sh"
+
+set -e
+
+
+########################################################################
+# Helper function
+########################################################################
+man_pages()
+{
+ find "${stardis_dir}/share/man" -type f -name "*.[1-9]"
+}
+
+# Man to convert is submitted on stdin
+man2html() # output_filename
+{
+ # Define the relative path to the root of the website
+ worktree="$(absdir "../")"
+ output="$(absdir "$1")"
+ root="$(relpath_to_dir "${output}" "${worktree}")"
+
+ {
+ cd ..
+ sh ./scripts/generate_header.sh "${OLDPWD##*/}/$1"
+ mandoc -O man=../man%S/%N.%S.html,fragment -I os=UNIX -T html
+ cat ./footer.html
+ cd "${OLDPWD}"
+ } \
+ | sed \
+ -e "s#href=\"../man1/htpp.1.html\"#href=\"${root}htrdr/man/man1/htpp.1.html\"#g" \
+ -e "s#href=\"../man5/htrdr-image.5.html\"#href=\"${root}htrdr/man/man5/htrdr-image.5.html\"#g" \
+ -e 's/<a class="Xr"[^>]\{0,\}>csplit(1)<\/a>/<a class "Xr">csplit(1)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>gnuplot(1)<\/a>/<a class "Xr">gnuplot(1)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>mmap(2)<\/a>/<a class "Xr">mmap(2)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>mpirun(1)<\/a>/<a class "Xr">mpirun(1)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>ppm(5)<\/a>/<a class "Xr">ppm(5)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>sysconf(3)<\/a>/<a class "Xr">sysconf(3)<\/a>/g' \
+ -e 's/<a class="Xr"[^>]\{0,\}>wordexp(3)<\/a>/<a class "Xr">wordexp(3)<\/a>/g' \
+ > "$1"
+}
+
+########################################################################
+# The script
+########################################################################
+man_pages | while read -r i; do
+ filename="$(basename "${i}")"
+ section="${filename##*.}"
+
+ if ! [ -d "./man/man${section}" ]; then
+ mkdir -p "./man/man${section}";
+ fi
+
+ dst="man/man${section}/${filename}.html"
+ man2html "${dst}" < "${i}"
+
+ # Check the result of the HTML conversion
+ if ! tidy --show-info no --show-filename yes -qe "${dst}"; then
+ >&2 printf '%s: error converting %s\n' "${0##*/}" "${i}"
+ exit 1
+ fi
+
+ # Write the generated files to standard output to inform the build
+ # system which files it needs to handle during installation.
+ printf '%s/%s\n' "${PWD##*/}" "${dst}"
+done
diff --git a/stardis/hooks/xx-sign-archives.sh b/stardis/hooks/xx-sign-archives.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+find downloads -name "Stardis*.tar.gz" \
+| sort \
+| while read -r i; do
+
+ sign="${i}.sig"
+
+ if ! [ -f "${sign}" ]; then
+ >&2 printf 'Signing %s\n' "${i}"
+ gpg --yes -a -o "${sign}" --detach-sign "${i}"
+ fi
+
+ # Write the generated files to standard output to inform the build
+ # system which files it needs to handle during installation.
+ printf '%s/%s\n' "${PWD##*/}" "${i}.sig"
+
+done
diff --git a/stardis/index.tsv b/stardis/index.tsv
@@ -0,0 +1,6 @@
+Overview stardis.html
+Validation validation.html
+Consortium consortium-@LANG@.html fr:en
+Manual pages stardis-docs.html
+Starter Pack starter-pack.html
+Release notes release-notes.html
diff --git a/stardis/release-notes.html.in b/stardis/release-notes.html.in
@@ -1,13 +0,0 @@
-<header>
- <h1>Stardis
- <span class=subtitle>
- Release notes
- </span>
- </h1>
-</header>
-
-<ul>
- <li><a href=stardis-solver-release-notes.html>Stardis Solver</a></li>
- <li><a href=stardis-release-notes.html>Stardis</a></li>
- <li><a href=sgreen-release-notes.html>Stardis Green</a></li>
-</ul>
diff --git a/stardis/sgreen-release-notes.sh b/stardis/sgreen-release-notes.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+
+set -e
+
+release_notes "${sgreen_readme}"
diff --git a/stardis/stardis-release-notes.sh b/stardis/stardis-release-notes.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+
+set -e
+
+release_notes "${stardis_readme}"
diff --git a/stardis/stardis-solver-release-notes.sh b/stardis/stardis-solver-release-notes.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+
+set -e
+
+release_notes "${solver_readme}"
diff --git a/stardis/stardis.md b/stardis/stardis.md.in
diff --git a/stardis/stardis.sh b/stardis/stardis.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+
+sed -e "s/@STARDIS_VERSION@/${stardis_version}/g" \
+ -e "s/@SOLVER_VERSION@/${solver_version}/g" \
+ -e "s/@SGREEN_VERSION@/${sgreen_version}/g" \
+ stardis.md.in
diff --git a/stardis/stardis_build.sh b/stardis/stardis_build.sh
@@ -1,152 +0,0 @@
-#!/bin/sh -e
-
-# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-. ../meso-menu.sh
-
-overview()
-{
- if [ $# -lt 3 ]; then
- printf
- "Usage: %s overview <solver-version> <stardis-version> <sgreen-version>\n"\
- "$0" "$1" "$2" >&2
- exit 1
- fi
-
- print_header -s Stardis -n Overview -r ../
- sed -e "s/@SOLVER_VERSION@/$1/g" \
- -e "s/@STARDIS_VERSION@/$2/g" \
- -e "s/@SGREEN_VERSION@/$3/g" \
- stardis.md | md2html
- print_footer
-}
-
-validation()
-{
- print_header -s Stardis -n Validation -r ../
- md2html validation.md
- print_footer
-}
-
-consortium()
-{
- if [ $# -lt 1 ]; then
- printf "Usage: %s consortium <fr|en>\n" "$0" >&2
- exit 1
- fi
-
- print_header -s Stardis -n Consortium -l "$1" -r ../
- md2html consortium-"$1".md
- print_footer
-}
-
-documentations()
-{
- print_header -s Stardis -n Documentations -r ../
- md2html stardis-docs.md
- print_footer
-}
-
-release_notes_list()
-{
- print_header -s Stardis -n "Release notes" -r ../
- md2html release-notes.md
- print_footer
-}
-
-release_notes()
-{
- src="$(basename "$1" ".html").md"
-
- print_header -s Stardis -n "Release notes" -r ../
- md2html "${src}"
- print_footer
-}
-
-starter_pack2()
-{
- print_header -s Stardis -n "Starter-Pack" -r ../
- md2html
- print_footer
-}
-
-starter_pack()
-{
- if [ $# -lt 1 ]; then
- printf "Usage: %s starter_pack <readme> <version>\n" "$0" >&2
- exit 1
- fi
-
- sed -n '1,/^## Quick start/p' "$1" | sed '$d'
-
- printf '\n[](images/IR_animation_1080x720x32x128.gif)\n'
- printf '> Illustration of the infrared rendering of the porous\n'
- printf '> example supplied in the Starter Pack.\n'
- printf '> The color map displays the temperature in Kelvin.\n'
- printf '> The animation was produced by a simple\n'
- printf '> rotation of the camera around the center of the foam.\n'
- printf '> Each one of the 32 frames is a full image produced by\n'
- printf '> a Stardis run.\n'
-
- printf '## Downloads\n'
-
- printf '<table class="list">\n'
- printf ' <tr><th>Version</th><th>Archive</th></tr>\n'
-
- archs=$(find downloads -name "Stardis-Starter-Pack*.tar.gz" | sort -r)
- printf '%s\n' "${archs}" | \
- while read -r i ; do
- version=$(echo "${i}" | sed "s/.*Starter-Pack-\(.*\)\.tar.gz/\1/g")
- printf ' <tr>\n'
- printf ' <td>%s</td>\n' "${version}"
- printf ' <td>[<a href="%s">tarball</a>]\n' "${i}"
- printf ' [<a href="%s.sig">pgp</a>]\n' "${i}"
- printf ' </td>\n'
- printf ' </tr>\n'
- done
- printf '</table>\n\n'
-
- sed -n '/^## Quick start/,/^### The heatsink/p' "$1" | sed '$d'
-
- sed -n '/^### The heatsink/,/### The porous medium/p' "$1" | sed '$d'
-
- printf '\n[](images/heatsink.jpg)\n'
- printf '\n[](images/heatsinkx50.jpg)\n'
- printf '\n> Geometry of the heat sink test cases\n\n'
-
- sed -n '/^### The porous medium/,/^### The city/p' "$1" | sed '$d'
-
- printf '\n[](images/foam.jpg)\n'
- printf '> Geometry of the porous example.\n'
- printf '> It is in fact a foam composed of a set of kelvin cells.\n'
-
- sed -n '/^### The city/,/^## /p' "$1" | sed '$d'
-
- printf '\n[](images/city.jpg)\n'
- printf '> Geometry of the "city" test case.\n'
- printf '> Each building is fully described, from balconies and rooms\n'
- printf '> to walls, foundations, floors and insulation.\n'
- printf '\n'
- printf '\n[](images/IR_city_640x480x1024_273-275.png)\n'
- printf '> Infrared rendering of the “city” test case illustrating\n'
- printf '> thermal bridges,\n'
- printf '> particularly those coming from the uninsulated roofs.\n'
- printf '> The color map displays the temperature in Kelvin.\n'
-
- sed -n '/^## Release notes/,$p' "$1"
-}
-
-"$@"
diff --git a/stardis/starter-pack.sh b/stardis/starter-pack.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# Copyright (C) 2017-2025 |Méso|Star> (contact@meso-star.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "./config.sh.in"
+
+set -e
+
+sed -n '1,/^## Quick start/p' "${spk_readme}" | sed '$d'
+
+printf '\n[]'
+printf '(images/IR_animation_1080x720x32x128.gif)\n'
+printf '> Illustration of the infrared rendering of the porous\n'
+printf '> example supplied in the Starter Pack.\n'
+printf '> The color map displays the temperature in Kelvin.\n'
+printf '> The animation was produced by a simple\n'
+printf '> rotation of the camera around the center of the foam.\n'
+printf '> Each one of the 32 frames is a full image produced by\n'
+printf '> a Stardis run.\n'
+
+printf '## Downloads\n'
+
+printf '<table class="list">\n'
+printf ' <tr><th>Version</th><th>Archive</th></tr>\n'
+
+archs=$(find downloads -name "Stardis-Starter-Pack*.tar.gz" | sort -r)
+printf '%s\n' "${archs}" | \
+while read -r i ; do
+ version=$(echo "${i}" | sed "s/.*Starter-Pack-\(.*\)\.tar.gz/\1/g")
+ printf ' <tr>\n'
+ printf ' <td>%s</td>\n' "${version}"
+ printf ' <td>[<a href="%s">tarball</a>]\n' "${i}"
+ printf ' [<a href="%s.sig">pgp</a>]\n' "${i}"
+ printf ' </td>\n'
+ printf ' </tr>\n'
+done
+printf '</table>\n\n'
+
+sed -n '/^## Quick start/,/^### The heatsink/p' "${spk_readme}" | sed '$d'
+
+sed -n '/^### The heatsink/,/### The porous medium/p' "${spk_readme}" | sed '$d'
+
+printf '\n[](images/heatsink.jpg)\n'
+printf '\n[](images/heatsinkx50.jpg)\n'
+printf '\n> Geometry of the heat sink test cases\n\n'
+
+sed -n '/^### The porous medium/,/^### The city/p' "${spk_readme}" | sed '$d'
+
+printf '\n[](images/foam.jpg)\n'
+printf '> Geometry of the porous example.\n'
+printf '> It is in fact a foam composed of a set of kelvin cells.\n'
+
+ sed -n '/^### The city/,/^## /p' "${spk_readme}" | sed '$d'
+
+printf '\n[](images/city.jpg)\n'
+printf '> Geometry of the "city" test case.\n'
+printf '> Each building is fully described, from balconies and rooms\n'
+printf '> to walls, foundations, floors and insulation.\n'
+printf '\n'
+printf '\n[]'
+printf '(images/IR_city_640x480x1024_273-275.png)\n'
+printf '> Infrared rendering of the “city” test case illustrating\n'
+printf '> thermal bridges,\n'
+printf '> particularly those coming from the uninsulated roofs.\n'
+printf '> The color map displays the temperature in Kelvin.\n'
+
+sed -n '/^## Release notes/,$p' "${spk_readme}"