commit 8405674609558cb2c5598eb201f5d29df83d7e66
parent 980bf7b5a053b48bab7ecd2f5efe95ec6831bf2d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 18 Feb 2022 16:28:23 +0100
stardis: rm the obsolete stardis.sh script
Diffstat:
| D | stardis/stardis.sh | | | 251 | ------------------------------------------------------------------------------- |
1 file changed, 0 insertions(+), 251 deletions(-)
diff --git a/stardis/stardis.sh b/stardis/stardis.sh
@@ -1,251 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2017-2022 |Meso|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
-
-source ../meso-menu.sh
-
-if [ $# -lt 2 ]; then
- echo "Usage: $0 VERSION VERSION_PACK"
- exit 1
-fi
-
-if [ ! -f "./downloads/Stardis-$1-GNU-Linux64.tar.gz" ]; then
- echo "Cannot find ./downloads/Stardis-$1-GNU-Linux64.tar.gz"
- exit 1
-fi
-
-dir_curr=$(pwd) # Current directory
-dir_temp=$(mktemp -d) # Working directory
-
-################################################################################
-# Sign the package
-################################################################################
-tput bold; echo ">>> Stardis packages"; tput sgr0
-archs=$(find "./downloads" -regex "^.*/Stardis-.*[0-9]+\.[0-9]+\.[0-9]+.*tar.gz")
-
-sign_something=0
-for arch in $archs; do
- if [ ! -f $arch.sig ]; then
- echo "Sign $arch"
- gpg -a -o $arch.sig --detach-sign $arch
- sign_something=1
- fi
-done
-
-if [ $sign_something == 0 ]; then
- echo "Nothing to do"
-fi
-
-echo ""
-
-################################################################################
-# Extract the current archive
-################################################################################
-cd $dir_temp
-arch=Stardis-$1-GNU-Linux64
-cp "$dir_curr/downloads/$arch.tar.gz" .
-tar xzf $arch.tar.gz
-sdis_spk=Stardis-Starter-Pack-$2
-tar xzf $dir_curr/downloads/$sdis_spk.tar.gz $sdis_spk/README.md
-cd $dir_curr
-
-################################################################################
-# Generate the release notes
-################################################################################
-cd $dir_temp
-solver_release_notes=$($markdown $arch/share/doc/stardis-solver/README.md \
- | sed '/^<h2>Release notes<\/h2>/,$!d' \
- | sed 1d \
- | sed '/^<h2>License<\/h2>/,$d')
-stardis_release_notes=$($markdown $arch/share/doc/stardis/README.md \
- | sed '/^<h2>Release notes<\/h2>/,$!d' \
- | sed 1d \
- | sed '/^<h2>License<\/h2>/,$d')
-sgreen_release_notes=$($markdown $arch/share/doc/sgreen/README.md \
- | sed '/^<h2>Release notes<\/h2>/,$!d' \
- | sed 1d \
- | sed '/^<h2>License<\/h2>/,$d')
-cd $dir_curr
-
-################################################################################
-# Generate the overview page
-################################################################################
-tput bold; echo ">>> Generate the Stardis web pages"; tput sgr0
-echo "Write stardis.html"
-{
- print_header Stardis Overview;
- VERSION=$1 envsubst < stardis.html.in;
- print_footer;
-} > stardis.html
-
-################################################################################
-# Generate the consortium page
-################################################################################
-echo "Write consortium-fr.html"
-{
- print_header Stardis Consortium fr;
- cat consortium-fr.html.in;
- print_footer;
-} > consortium-fr.html
-
-echo "Write consortium-en.html"
-{
- print_header Stardis Consortium;
- cat consortium-en.html.in;
- print_footer;
-} > consortium-en.html
-
-################################################################################
-# Generate the Downloads page
-################################################################################
-echo "Write 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>"
- echo $solver_release_notes
- echo "<h2>Stardis CLI release notes</h2>"
- echo $stardis_release_notes
- echo "<h2>Stardis-Green CLI release notes</h2>"
- echo $sgreen_release_notes
- print_footer;
-} > stardis-downloads.html;
-
-################################################################################
-# Generate the starter pack
-################################################################################
-echo "Write starter-pack.html"
-
-$markdown $dir_temp/$sdis_spk/README.md \
- | sed 's/<pre><code>/<pre class=code>/g' \
- | sed 's/<\/code><\/pre>/\<\/pre\>/g' \
- > $dir_temp/$sdis_spk/README.html
-
-intro=$(cat $dir_temp/$sdis_spk/README.html \
- | sed 1d \
- | sed '/^<h2>Content<\/h2>/,$d')
-
-content1=$(cat $dir_temp/$sdis_spk/README.html \
- | sed '/^<h2>Content<\/h2>/,$!d' \
- | sed 1d \
- | sed '/^<h3>The porous medium<\/h3>/,$d')
-
-content2=$(cat $dir_temp/$sdis_spk/README.html \
- | sed '/^<h3>The porous medium<\/h3>/,$!d' \
- | sed '/^<h2>Copyright notice<\/h2>/,$d')
-
-license=$(cat $dir_temp/$sdis_spk/README.html \
- | sed '/^<h2>Copyright notice<\/h2>/,$!d' \
- | 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
-
-################################################################################
-# Generate the reference documentation
-################################################################################
-for((i=0; i<${#stardis_man_pages[@]}; ++i)); do
- entry=(${stardis_man_pages[$i]})
- man_name=${entry[0]}
- man_num=${entry[1]}
- man_path="$dir_temp/$arch/share/man/man${entry[1]}/$man_name.$man_num"
- output="man/man${entry[1]}/$man_name.$man_num.html"
- convert_man_page Stardis "$man_path" "$output" $1
-
- if [ "$man_name" == "stardis" ]; then
- # Patch the htpp hyperlink
- sed -i 's/<A HREF="\.\.\/man1\/htpp\.1\.html">/<A HREF="..\/..\/..\/high-tune\/man\/man1\/htpp.1.html">/g' $output
- fi
- if [ "$man_name" == "stardis-output" ]; then
- # Patch the htrdr-image hyperlink
- sed -i 's/<A HREF="\.\.\/man5\/htrdr-image\.5\.html">/<A HREF="..\/..\/..\/high-tune\/man\/man5\/htrdr-image.5.html">/g' $output
- fi
-
-done
-