commit 2a773569843093cc65baae3fd34f0fe740487d8f
parent 9d5414b4ba1c7bcd97b483be175ea620059330f7
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 29 Nov 2018 10:27:09 +0100
Make optional Windows in the star-engine download insert
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/star-engine/star-engine.html.in b/star-engine/star-engine.html.in
@@ -8,11 +8,7 @@
<li>GNU/Linux:
<a href="downloads/Star-Engine-${VERSION}-GNU-Linux64.tar.gz">tarball</a> /
<a href="downloads/Star-Engine-${VERSION}-GNU-Linux64.tar.gz.sig">pgp</a></li>
- <li>Windows:
- <a href="downloads/Star-Engine-${VERSION}-Win64.zip">zip</a> /
- <a href="downloads/Star-Engine-${VERSION}-Win64.zip.sig">pgp</a></li>
- </ul>
- <ul>
+ ${WINDOWS}
<li>Sources:
<a href="downloads/Star-Engine-${VERSION}-Sources.zip">zip</a> /
<a href="downloads/Star-Engine-${VERSION}-Sources.zip.sig">pgp</a></li>
diff --git a/star-engine/star-engine.sh b/star-engine/star-engine.sh
@@ -83,10 +83,17 @@ $markdown $2 \
################################################################################
# Generate the overview page
################################################################################
+unset win
+if [ -f downloads/Star-Engine-$1-Win64.zip ]; then
+ win="<li>Windows: \
+<a href="downloads/Star-Engine-$1-Win64.zip">zip</a> / \
+<a href="downloads/Star-Engine-$1-Win64.zip.sig">pgp</a></li></ul><ul>"
+fi
+
echo "Write star-engine.html"
{
print_header Star-Engine Overview
- VERSION=$1 envsubst < star-engine.html.in
+ WINDOWS=$(echo $win) VERSION=$1 envsubst < star-engine.html.in
print_footer
} > star-engine.html