commit 789532c8db1390a810b8770ffa6b259108c0dc2d
parent 23020322657acb1f12db18b9d88d110d48c3fd6f
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 8 Apr 2022 15:46:56 +0200
Rename check in lint & update print_header profile
Diffstat:
21 files changed, 137 insertions(+), 221 deletions(-)
diff --git a/Makefile b/Makefile
@@ -20,7 +20,7 @@ SUBDIRS=art htrdr misc schiff solstice star-engine stardis
SCRIPTS=\
build_htaccess.sh\
- check_html.sh\
+ lint_html.sh\
configure.sh\
configure_targets.sh\
convert_man.sh\
@@ -45,9 +45,9 @@ clean:
printf "\e[1m>>> %s\e[0m\n" $$subdir; \
$(MAKE) -C $${subdir} $@; echo ""; done
-check:
+lint:
@for i in $(SCRIPTS); do \
- printf "Checking %s\n" "$${i}"; \
+ printf "Linting %s\n" "$${i}"; \
shellcheck -o all -x "$${i}"; done
@echo ""
@for subdir in $(SUBDIRS); do \
diff --git a/art/Makefile b/art/Makefile
@@ -57,7 +57,7 @@ build_all: $(ART_SIG) $(HTML)
clean:
@echo "Cleaning generated files"
- @rm -f $(HTML) $(HTML:=.err) .sig .chk
+ @rm -f $(HTML) $(HTML:=.err) .sig .lint
distclean: clean
@echo "Cleaning PGP signatures"
@@ -104,13 +104,13 @@ karine.html: karine.html.in art_build.sh Makefile $(KARINE_IMG)
################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
- @echo "Checking art_build.sh" && shellcheck -o all -x art_build.sh
+lint_shells:
+ @echo "Linting art_build.sh" && shellcheck -o all -x art_build.sh
################################################################################
# Miscellaneous targets
@@ -119,6 +119,6 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(ART_PKG) > .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
diff --git a/art/art_build.sh b/art/art_build.sh
@@ -19,7 +19,7 @@
overview()
{
- print_header ART Overview
+ print_header -s ART -n Overview -r ../
cat art.html.in
print_footer
}
@@ -31,7 +31,7 @@ kspectrum()
exit 1
fi
- print_header ART Kspectrum
+ print_header -s ART -n Kspectrum -r ../
VERSION="$1" envsubst < kspectrum.html.in
print_footer
}
@@ -43,28 +43,28 @@ kdistribution()
exit 1
fi
- print_header ART Kdistribution
+ print_header -s ART -n Kdistribution -r ../
VERSION="$1" envsubst < kdistribution.html.in
print_footer
}
hr_ppart()
{
- print_header ART HR_PPart
+ print_header -s ART -n HR_PPart -r ../
cat hr_ppart.html.in
print_footer
}
ppart_lw()
{
- print_header ART PPart_LW
+ print_header -s ART -n PPart_LW -r ../
cat ppart_lw.html.in
print_footer
}
ppart_sw()
{
- print_header ART PPart_SW
+ print_header -s ART -n PPart_SW -r ../
cat ppart_sw.html.in
print_footer
}
@@ -76,7 +76,7 @@ karine()
exit 1
fi
- print_header ART Karine
+ print_header -s ART -n Karine -r ../
VERSION="$1" envsubst < karine.html.in
print_footer
}
diff --git a/configure_targets.sh b/configure_targets.sh
@@ -24,13 +24,13 @@ sig()
done
}
-chk()
+lint()
{
dir=$(dirname "$0")
for i in "$@"; do
- printf "%s.chk: %s %s/check_html.sh\n" "${i}" "${i}" "${dir}"
- printf "\t@echo Checking %s\n" "${i}"
- printf "\t@PATH+=:%s sh check_html.sh %s\n" "${dir}" "${i}"
+ printf "%s.lint: %s %s/lint_html.sh\n" "${i}" "${i}" "${dir}"
+ printf "\t@echo Linting %s\n" "${i}"
+ printf "\t@PATH+=:%s sh lint_html.sh %s\n" "${dir}" "${i}"
done
}
diff --git a/convert_man.sh b/convert_man.sh
@@ -33,7 +33,7 @@ man_section=$(echo "${input}" \
| sed 's/.*man\([[:digit:]]\{1\}[[:alpha:]]\{0,1\}\)\/.*/\1/g')
{
- print_header "${section}" "man-${man_name}"
+ print_header -s "${section}" -n "${man_name}" -r ../../../
echo "<div style=\"font-variant: small-caps; float: right; color: #777777\">"
echo "${section} ${version}</div>";
echo "<header>"
@@ -47,8 +47,8 @@ man_section=$(echo "${input}" \
print_footer
} > "${output}"
-# Clean the html file generated by man2html and check it if necessary
-tidy --show-info no -m "${output}" > /dev/null 2>&1 || sh check_html.sh "${output}"
+# Clean the html file generated by man2html and lint it if necessary
+tidy --show-info no -m "${output}" > /dev/null 2>&1 || sh lint_html.sh "${output}"
# Remove hyperlink on csplit, feh, gnuplot, sed, mmap and mpirun commands
sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' "${output}"
diff --git a/htrdr/Makefile b/htrdr/Makefile
@@ -89,7 +89,8 @@ HTML=\
htrdr.html\
htrdr-atmosphere-spk.html\
htrdr-combustion-spk.html\
- htrdr-docs.html
+ htrdr-docs.html\
+ mods/htrdr-urban.html
build: .sig .man
@$(MAKE) -fMakefile -f .sig -f .man build_all
@@ -99,7 +100,7 @@ build_all: $(HTML) man
clean:
@echo "Cleaning generated files"
@rm -rf man
- @rm -f .sig .chk .man $(HTML) $(HTML:=.err)
+ @rm -f .sig .lint .man $(HTML) $(HTML:=.err)
distclean: clean
@echo "Cleaning PGP signatures and extracted files"
@@ -181,15 +182,22 @@ $(COMSPK_README):
@tar -xz -f $(COMSPK_ARCH) $(COMSPK_README)
################################################################################
+# Mods
+################################################################################
+mods/htrdr-urban.html: mods/htrdr-urban.html.in htrdr_build.sh
+ @echo "Building $@"
+ @$(SHELL) htrdr_build.sh mods > $@
+
+################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
- @echo "Checking htrdr_build.sh" && shellcheck -o all -x htrdr_build.sh
+lint_shells:
+ @echo "Linting htrdr_build.sh" && shellcheck -o all -x htrdr_build.sh
################################################################################
# Miscellaneous
@@ -198,9 +206,9 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(ATMSPK_PKG) $(COMSPK_PKG) > .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
.man: Makefile ../configure_targets.sh
@echo "Setup .man"
diff --git a/htrdr/htrdr.html.in b/htrdr/htrdr.html.in
@@ -289,11 +289,6 @@ href="https://gitlab.com/meso-star/star-engine/-/tree/htrdr"> git
repository</a> of <code>htrdr</code> for a complete description of the build
process and available options.</p>
-<pre class="code">
-~ $ source ~/htrdr-${VERSION}/local/etc/htrdr.profile
-~ $ htrdr --help
-</pre>
-
<div class="img" style="width: 20em">
<div style="width: 49.5%; float: left; padding-right: 1%" >
<a href="downward_flux_500x500x2048_sw_380_4000_879.349.jpg">
@@ -330,6 +325,11 @@ subdirectory of <code>htrdr-${VERSION}</code>. Source the provided
<code>htrdr.profile</code> file to register <code>htrdr</code> against the
current shell.</p>
+<pre class="code">
+~ $ source ~/htrdr-${VERSION}/local/etc/htrdr.profile
+~ $ htrdr --help
+</pre>
+
<p>If the AsciiDoc tool suite was installed on <code>make</code>
invocation, the <b>reference documentation</b> of the <code>htrdr</code>
program and its associated file formats should be available through man pages.
diff --git a/htrdr/htrdr_build.sh b/htrdr/htrdr_build.sh
@@ -39,18 +39,25 @@ overview()
| sed -n '/^<h2>Copyright notice<\/h2>/,$p' \
| sed 's/opyright (C)/opyright \©/g')
- print_header htrdr Overview
+ print_header -s htrdr -n Overview -r ../
VERSION=$2 RELEASE_NOTES="${release_notes}" COPYING="${copying}" envsubst < htrdr.html.in
print_footer
}
documentations()
{
- print_header htrdr Documentations
+ print_header -s htrdr -n Documentations -r ../
cat htrdr-docs.html.in
print_footer
}
+mods()
+{
+ print_header -s htrdr -n Mods -r ../../
+ cat mods/htrdr-urban.html.in
+ print_footer
+}
+
atmspk()
{
if [ $# -lt 2 ]; then
@@ -87,7 +94,7 @@ atmspk()
archs=$(find downloads -name "htrdr-Atmosphere-Starter-Pack*.tar.gz" | sort -r)
archs=$(echo "${archs}" && find downloads -name "High-Tune-Starter-Pack*.tar.gz" | sort -r )
- print_header htrdr Atmosphere-Starter-Pack
+ print_header -s htrdr -n Atmosphere-Starter-Pack -r ../
echo "<header>"
echo " <h1>Atmosphere Starter Pack</h1>"
@@ -211,7 +218,7 @@ comspk()
| sed '0,/<code>htrdr-combustion<\/code>/s//<a href=man\/man1\/htrdr-combustion.1.html>htrdr-combustion<\/a>/')
copying=$(echo "${readme}" | sed -n '/^<h2>Copyright notice<\/h2>/,$p')
- print_header htrdr Combustion-Starter-Pack
+ print_header -s htrdr -n Combustion-Starter-Pack -r ../
echo "<header>"
echo " <h1>Combustion Starter Pack</h1>"
diff --git a/check_html.sh b/lint_html.sh
diff --git a/meso-menu.sh b/meso-menu.sh
@@ -346,12 +346,26 @@ print_star_engine_sub_menu() {
}
print_header() {
- section=$1
- full_name=$2
- lang=$([ $# -ge 3 ] && echo "$3" || echo "en")
- name=${full_name#man-}
- is_man=$([ "${full_name}" != "${name}" ] && echo 1 || echo 0)
- root=$([ "${is_man}" = 1 ] && echo "../../../" || echo "../")
+ usage="print_header -s section -n name -r root [-l lang]"
+ section=; name=; lang=; root=
+ while getopts s:n:l:r: opt; do
+ case "${opt}" in
+ s) section=${OPTARG};;
+ n) name=${OPTARG};;
+ l) lang=${OPTARG};;
+ r) root=${OPTARG};;
+ ?) echo "${usage}" >& 2
+ exit 1;;
+ *) echo "Unreachable code" >& 2;;
+ esac
+ done
+
+ if [ -z "${section}" ] || [ -z "${name}" ] || [ -z "${root}" ]; then
+ echo "${usage}" >& 2
+ exit 1
+ fi
+
+ [ -z "${lang}" ] && lang="en"
echo "<!DOCTYPE html>"
echo ""
@@ -498,63 +512,6 @@ print_downloads() {
echo "</table>"
}
-convert_man_page() {
- section=$1
- input=$2
- output=$3
- version=$4
- output_dir=$(dirname "${output}")
- man_file=$(basename "${input}")
- man_name=$(echo "${man_file}" | sed 's/\(.*\)\.[0-7]/\1/')
- man_num=$(echo "${man_file}" | sed 's/.*\.\([0-7]\)/\1/')
-
- if [ ! -f "${input}" ]; then
- echo "Cannot find the '${input}' man page."
- return
- fi
-
- mkdir -p "${output_dir}"
-
- # Generate the man page
- echo "Write ${output}"
- {
- print_header "${section}" "man-${man_name}"
- printf "<div style=\"font-variant: small-caps; float: right; color: #777777\">"
- [ "${section}" = "htrdr" ] \
- && echo "<code style=\"font-variant:none\">${section}</code> ${version}</div>" \
- || echo "${section} ${version}</div>";
- echo "<header>"
- echo " <h1>${man_name}(${man_num})</h1>";
- echo "</header>"
- } > "${output}"
-
- man2html -r "${input}" \
- | tail -n +10 \
- | sed '/^<HR>$/,$d' \
- | sed '/\ /d' \
- | sed 's/<DL COMPACT>/<DL>/g' \
- >> "${output}"
-
- print_footer >> "${output}"
-
- # Remove hyperlink on csplit, feh, gnuplot, sed, mmap and mpirun commands
- sed -i 's/<B><A HREF="\.\.\/man1\/csplit\.1\.html">csplit<\/A><\/B>/csplit/g' "${output}"
- sed -i 's/<B><A HREF="\.\.\/man1\/feh\.1\.html">feh<\/A><\/B>/feh/g' "${output}"
- sed -i 's/<B><A HREF="\.\.\/man1\/gnuplot\.1\.html">gnuplot<\/A><\/B>/gnuplot/g' "${output}"
- sed -i 's/<B><A HREF="\.\.\/man1\/sed\.1\.html">sed<\/A><\/B>/sed/g' "${output}"
- sed -i 's/<B><A HREF="\.\.\/man1\/mpirun\.1\.html">mpirun<\/A><\/B>/mpirun/g' "${output}"
- sed -i 's/<B><A HREF="\.\.\/man2\/mmap\.2\.html">mmap<\/A><\/B>/mmap/g' "${output}"
-
- # Fix the hyperlink toward the GPLv3+ license
- sed -i 's/gpl\.html\.">\(.*\).<\/A>/gpl.html">\1<\/A>./g' "${output}"
-
- # Remove unexpected link on sqrt(2)
- sed -i 's/<A HREF="\.\.\/man2\/sqrt\.2\.html">sqrt<\/A>/sqrt/g' "${output}"
-
- # Fix the man2html issues that translates the ' char in cq
- sed -i "s/cq\([a-z]\)\>/'\1/g" "${output}"
-}
-
set +e
if hash markdown 2> /dev/null; then
export markdown=markdown
diff --git a/misc/Makefile b/misc/Makefile
@@ -27,7 +27,7 @@ build: $(HTML)
clean:
@echo "Cleaning generated files"
- @rm -f .chk\
+ @rm -f .lint\
about-en.html\
about-fr.html\
legal-en.html\
@@ -69,14 +69,14 @@ pgp_signatures.html: misc_build.sh
################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
- @echo "Checking misc_build.sh" && shellcheck -o all -x misc_build.sh
+lint_shells:
+ @echo "Linting misc_build.sh" && shellcheck -o all -x misc_build.sh
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
diff --git a/misc/misc.sh b/misc/misc.sh
@@ -1,56 +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
-
-tput bold; echo ">>> Miscellaneous web pages"; tput sgr0
-echo "Write about-en.html"
-{
- print_header Home About
- cat about-en.html.in
- print_footer
-} > about-en.html
-
-echo "Write about-fr.html"
-{
- print_header Home About fr
- cat about-fr.html.in
- print_footer
-} > about-fr.html
-
-echo "Write legal-en.html"
-{
- print_header Home Legal
- cat legal-en.html.in
- print_footer
-} > legal-en.html
-
-echo "Write legal-fr.html"
-{
- print_header Home Legal fr
- cat legal-fr.html.in
- print_footer
-} > legal-fr.html
-
-echo "Write pgp_signatures.html"
-{
- print_header Home PGP
- cat pgp_signatures.html.in
- print_footer
-} > pgp_signatures.html
diff --git a/misc/misc_build.sh b/misc/misc_build.sh
@@ -24,7 +24,7 @@ about()
exit 1
fi
- print_header Home About "$1"
+ print_header -s Home -n About -l "$1" -r ../
cat "about-$1.html.in"
print_footer
}
@@ -36,14 +36,14 @@ legal()
exit 1
fi
- print_header Home Legal "$1"
+ print_header -s Home -n Legal -l "$1" -r ../
cat "legal-$1.html.in"
print_footer
}
pgp()
{
- print_header Home PGP
+ print_header -s Home -n PGP -r ../
cat pgp_signatures.html.in
print_footer
}
diff --git a/schiff/Makefile b/schiff/Makefile
@@ -47,7 +47,7 @@ build_all: $(HTML) man
clean:
@echo "Cleaning generated files"
@rm -rf man
- @rm -f .sig .chk .man $(HTML) $(HTML:=.err)
+ @rm -f .sig .lint .man $(HTML) $(HTML:=.err)
distclean: clean
@echo "Cleaning PGP signatures and extracted files"
@@ -87,12 +87,12 @@ $(SCHIFF_README) $(MAN):
################################################################################
# Check files
################################################################################
-check: build .chk .sig
- @$(MAKE) -fMakefile -f .chk -f .sig check_all
+lint: build .lint .sig
+ @$(MAKE) -fMakefile -f .lint -f .sig lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
+lint_shells:
@echo "Checking schiff_build.sh" && shellcheck -o all -x schiff_build.sh
################################################################################
@@ -102,9 +102,9 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(SCHIFF_PKG)> .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
.man: Makefile ../configure_targets.sh
@echo "Setup .man"
diff --git a/schiff/schiff_build.sh b/schiff/schiff_build.sh
@@ -24,7 +24,7 @@ overview()
exit 1
fi
- print_header Schiff Overview
+ print_header -s Schiff -n Overview -r ../
VERSION=$1 envsubst < schiff.html.in
print_footer
}
@@ -39,7 +39,7 @@ downloads()
release_notes=$(${markdown} "$1" \
| sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' | sed '$d')
- print_header Schiff Downloads
+ print_header -s Schiff -n Downloads -r ../
echo "<header><h1>Download Schiff</h1></header>"
print_downloads Schiff "Linux"
diff --git a/solstice/Makefile b/solstice/Makefile
@@ -81,7 +81,7 @@ build_all: $(HTML) man
clean:
@echo "Cleaning generated files"
@rm -rf man
- @rm -f .sig .chk .man $(HTML) $(HTML:=.err)
+ @rm -f .sig .lint .man $(HTML) $(HTML:=.err)
distclean: clean
@echo "Cleaning PGP signatures and extracted files"
@@ -143,12 +143,12 @@ $(SOLPP_README):
################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
+lint_shells:
@echo "Checking solstice_build.sh" && shellcheck -o all -x solstice_build.sh
################################################################################
@@ -158,9 +158,9 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(SOLSTICE_PKG) $(SOLPP_PKG) > .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
.man: Makefile ../configure_targets.sh
@echo "Setup .man"
diff --git a/solstice/solstice_build.sh b/solstice/solstice_build.sh
@@ -25,7 +25,7 @@ overview()
exit 1
fi
- print_header Solstice Overview
+ print_header -s Solstice -n Overview -r ../
VERSION=$1 envsubst < solstice.html.in
print_footer
}
@@ -41,7 +41,7 @@ downloads()
release_notes=$(${markdown} "$1" \
| sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' | sed '$d')
- print_header Solstice Downloads
+ print_header -s Solstice -n Downloads -r ../
echo "<header><h1>Download Solstice</h1></header>"
print_downloads Solstice
echo "${release_notes}"
@@ -86,7 +86,7 @@ resources()
| sed -n '/^<h2>Release notes<\/h2>/,/^<h2>License<\/h2>/p' \
| sed -e '$d' -e 's/\<h3\>/h4/g')
- print_header Solstice Resources
+ print_header -s Solstice -n Resources -r ../
echo "<header><h1>Additional resources</h1></header>"
cat solstice-abg.html.in
VERSION=$2 envsubst < solstice-pp.html.in
diff --git a/star-engine/Makefile b/star-engine/Makefile
@@ -111,7 +111,7 @@ build_all: $(HTML)
clean:
@echo "Cleaning generated files"
- @rm -f $(HTML) $(HTML:=.err) .sig .chk
+ @rm -f $(HTML) $(HTML:=.err) .sig .lint
distclean: clean
@echo "Cleaning PGP signatures"
@@ -209,12 +209,12 @@ $(STAR_ENGINE_HEADERS) $(STAR_ENGINE_READMES):
################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
+lint_shells:
@echo "Checking star_engine_build.sh" && shellcheck -o all -x star_engine_build.sh
################################################################################
@@ -224,6 +224,6 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(STAR_ENGINE_PKG) > .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
diff --git a/star-engine/star_engine_build.sh b/star-engine/star_engine_build.sh
@@ -31,7 +31,7 @@ overview()
<a href=\"downloads/Star-Engine-$1-Win64.zip.sig\">pgp</a></li></ul><ul>"
fi
- print_header Star-Engine Overview
+ print_header -s Star-Engine -n Overview -r ../
WINDOWS="${win}" VERSION="$1" envsubst < star-engine.html.in
print_footer
}
@@ -46,7 +46,7 @@ downloads()
release_notes=$(${markdown} "$1" | \
sed -n '/^<h2>Release notes<\/h2>/,/^<h2>Licenses<\/h2>/p' | sed '$d')
- print_header Star-Engine Downloads
+ print_header -s Star-Engine -n Downloads -r ../
echo "<header><h1>Download Star-Engine</h1></header>"
print_downloads Star-Engine
echo "${release_notes}"
@@ -75,7 +75,7 @@ component()
| sed -n '/^<h2>Release notes<\/h2>/,$p' \
| sed 's/opyright (C)/opyright \©/g')
- print_header Star-Engine "$1"
+ print_header -s Star-Engine -n "$1" -r ../
version=$(header_version "$3")
VERSION="${version}" \
@@ -115,7 +115,7 @@ star_geom()
exit 1
fi
- print_header Star-Engine Star-Geom
+ print_header -s Star-Engine -n Star-Geom -r ../
AW_VERSION="${aw_version}" \
S3DAW_VERSION="${s3daw_version}" \
S3DSTL_VERSION="${s3dstl_version}" \
diff --git a/stardis/Makefile b/stardis/Makefile
@@ -88,7 +88,7 @@ build_all: $(HTML) man
clean:
@echo "Cleaning generated files"
@rm -rf man
- @rm -f .sig .man .chk\
+ @rm -f .sig .man .lint\
stardis-release-notes.html.in\
stardis-green-release-notes.html.in\
stardis-solver-release-notes.html.in\
@@ -176,12 +176,12 @@ $(STARTER_PACK_README):
################################################################################
# Check files
################################################################################
-check: build .chk
- @$(MAKE) -fMakefile -f .chk check_all
+lint: build .lint
+ @$(MAKE) -fMakefile -f .lint lint_all
-check_all: check_shells $(HTML:=.chk)
+lint_all: lint_shells $(HTML:=.lint)
-check_shells:
+lint_shells:
@echo "Checking stardis_build.sh" && shellcheck -o all -x stardis_build.sh
################################################################################
@@ -191,9 +191,9 @@ check_shells:
@echo "Setup .sig"
@$(SHELL) ../configure_targets.sh sig $(STARDIS_PKG) $(STARTER_PACK_PKG) > .sig
-.chk: Makefile ../configure_targets.sh
- @echo "Setup .chk"
- @$(SHELL) ../configure_targets.sh chk $(HTML) > .chk
+.lint: Makefile ../configure_targets.sh
+ @echo "Setup .lint"
+ @$(SHELL) ../configure_targets.sh lint $(HTML) > .lint
.man: Makefile ../configure_targets.sh
@echo "Setup .man"
diff --git a/stardis/stardis_build.sh b/stardis/stardis_build.sh
@@ -24,7 +24,7 @@ overview()
exit 1
fi
- print_header Stardis Overview
+ print_header -s Stardis -n Overview -r ../
VERSION=$1 envsubst < stardis.html.in
print_footer
}
@@ -36,7 +36,7 @@ consortium()
exit 1
fi
- print_header Stardis Consortium "$1"
+ print_header -s Stardis -n Consortium -l "$1" -r ../
cat "consortium-$1.html.in"
print_footer
}
@@ -49,7 +49,7 @@ downloads()
exit 1
fi
- print_header Stardis Downloads
+ print_header -s Stardis -n Downloads -r ../
echo '<header><h1>Download Stardis</h1></header>'
echo "<p>The proposed archives contain precompiled version of the <a"
@@ -106,7 +106,7 @@ starter_pack()
| sed -n '/^<h2>Copyright notice<\/h2>/,$p' \
| sed 's/opyright (C)/opyright \©/g')
- print_header Stardis Starter-Pack
+ print_header -s Stardis -n Starter-Pack -r ../
echo "<header>"
echo " <h1>Stardis: Starter Pack</h1>"