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 e1a45f19de7afdb3920cf932b29dfb79fd82d17f
parent a15e755c13f283e1e9323f7b222d28ce1bd1eb48
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue,  3 Oct 2017 17:25:05 +0200

Auto-generate the Solstice-PP.tar.gz archive

Diffstat:
MMakefile | 24++++++++++++++++++++----
Msolstice-menu.sh | 2+-
Msolstice-resources.html.in | 2+-
Msolstice.html.in | 2+-
Msolstice.sh | 35++++++++++++++++++++++++++++++++---
5 files changed, 55 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -15,6 +15,8 @@ SOLSTICE-VERSION=0.6.1 SOLSTICE-ABG=~/mesdocs/meso-star/solstice-docs/Solstice-ABG/ +SOLSTICE-PP=~/code/meso-star/solstice-scripts/ + REMOTE=OVH:www/solstice/ .PHONY: default @@ -28,7 +30,7 @@ solstice: @tput bold @echo -e ">>> Generate Solstice web pages. Version: '$(SOLSTICE-VERSION)'" @tput sgr0 - @sh ./solstice.sh $(SOLSTICE-VERSION) $(SOLSTICE-ABG) + @sh ./solstice.sh $(SOLSTICE-VERSION) $(SOLSTICE-ABG) $(SOLSTICE-PP) .PHONY: clean clean: @@ -36,13 +38,27 @@ clean: man \ solstice.html \ solstice-downloads.html \ + solstice-resources.html \ release_notes.html.in \ downloads/*.sig \ downloads/Solstice-ABG.pdf \ - downloads/Solstice-ABG-rsrc.zip + downloads/Solstice-ABG-rsrc.zip \ + downloads/Solstice-PP-Sources.tar.gz .PHONY: publish publish: - rsync -avz solstice.html solstice-downloads.html meso.css themis.png $(REMOTE) - rsync -avz downloads/*.tar.gz downloads/*.zip downloads/*.sig downloads/Solstice-ABG* $(REMOTE)/downloads/ + rsync -avz \ + solstice.html \ + solstice-downloads.html \ + solstice-resources.html \ + meso.css \ + themis.png \ + $(REMOTE) + rsync -avz \ + downloads/*.tar.gz \ + downloads/*.zip \ + downloads/*.sig \ + downloads/Solstice-ABG* \ + downloads/Solstice-PP-Sources.tar.gz \ + $(REMOTE)/downloads/ rsync -avzr man $(REMOTE) diff --git a/solstice-menu.sh b/solstice-menu.sh @@ -98,7 +98,7 @@ print_downloads() { echo ' <th>Sources</th>' echo ' </tr>' - local archs=$(ls -r downloads/Solstice-*.tar.gz ) + local archs=$(find downloads -regex ".*/Solstice-[0-9]+\.[0-9]+\.[0-9]+-.*tar.gz" | sort -r ) local arch; for arch in $archs; do diff --git a/solstice-resources.html.in b/solstice-resources.html.in @@ -38,7 +38,7 @@ href="https://www.gnu.org/licenses/gpl.html">license</a> for details.</p> <table> <tr><th>Sources</th></tr> - <tr><td>[<a href="">tarball</a>]</td></tr> + <tr><td>[<a href="downloads/Solstice-PP-Sources.tar.gz">tarball</a>]</td></tr> </table> <p>To use these tools, download the provided archive that contains their diff --git a/solstice.html.in b/solstice.html.in @@ -139,6 +139,6 @@ $ man solstice-output $ man solstice-receiver </pre> -<p>The Solstice <a href="solstice-receivers.html#ABG">beginner's guide</a> +<p>The Solstice <a href="solstice-resources.html#ABG">beginner's guide</a> gives fundamentals of Solstice, starting from simple examples to more complex ones.</p> diff --git a/solstice.sh b/solstice.sh @@ -20,8 +20,8 @@ set -e source ./solstice-menu.sh -if [ $# -lt 2 ]; then - echo "Usage: $0 VERSION SOLSTICE-ABG-PATH" +if [ $# -lt 3 ]; then + echo "Usage: $0 VERSION ABG-PATH PP-PATH" exit 1 fi @@ -36,6 +36,11 @@ if [ ! -f "$2/guide0.6.tex" ]; then exit 1 fi +if [ ! -f "$3/solpp.c" ]; then + echo "Cannot found the Solstice-PP sources." + exit 1 +fi + dir_curr=$(pwd) # Current directory dir_temp=$(mktemp -d) # Working directory @@ -73,6 +78,31 @@ if [ ! -f downloads/Solstice-ABG-rsrc.zip ]; then fi ################################################################################ +# Generate the Solstice-PP archive +################################################################################ +if [ ! -f downloads/Solstice-PP-Sources.tar.gz ]; then + echo "Archive the Solstice-PP sources" + cd $dir_temp + mkdir Solstice-PP-Sources + cd Solstice-PP-Sources + cp $3/sol*.c $3/solpp.h . + + { + echo 'PROG = solpp solppraw solpaths' + echo '' + echo '.PHONY: default' + echo 'default: $(PROG)' + echo '' + echo '$(PROG): %: %.c solpp.h' + echo -e '\t@echo -e " CC $<"; $(CC) -o $@ -O2 -std=c99 -pedantic -Wall $<' + } > Makefile + cd .. + tar czvf Solstice-PP-Sources.tar.gz Solstice-PP-Sources + cp Solstice-PP-Sources.tar.gz $dir_curr/downloads/ + cd $dir_curr +fi + +################################################################################ # Sign the package ################################################################################ archs=$(find downloads -regex "^.*/Solstice-[0-9]+\.[0-9]+\.[0-9]+-.*zip" \ @@ -117,7 +147,6 @@ echo "Write solstice-downloads.html" print_header Downloads; echo '<header><h1>Downloads</h1></header>'; print_downloads; - cat solstice-abg.html.in VERSION=$1 envsubst < pgp_signature.html.in; cat release_notes.html.in; print_footer;