star-ty

Generate content for online publication
git clone git://git.meso-star.fr/star-ty.git
Log | Files | Refs | README | LICENSE

commit e37e8e5c62e2a1bde0d412b87ed2f35da0b094b3
parent b428b987884854f38048a5e9284920a5e9db067c
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 24 Sep 2025 14:50:13 +0200

Handle incorrect invocation of sty-index

Print an error message directly in the sty-index script. Previously, it
was printed by the sty-list script, which was confusing since the
command reporting the error was sty-list and not sty-index as expected.

Diffstat:
Msrc/sty-index | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/sty-index b/src/sty-index @@ -1,5 +1,5 @@ #!/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 @@ -22,6 +22,13 @@ set -e # Print to standard output the Makefile targets that make the section # index file a prerequisite for the section's HTML content. +if [ ! -e "menu.tsv" ]; then + >&2 printf \ + '%s: not a star-typesetting directory (the menu.tsv file is missing)\n' \ + "${0##*/}" + exit 1 +fi + html="$(sty-list html)" sections | while read -r i; do