star-ty

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

commit 1566e4f30fd43bab57056509e62cfdaf4232752f
parent 4f18aff63b6396ee31d204a577e9694a06edbfed
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 22 Sep 2025 16:14:38 +0200

Correction to the sty-list script

It displayed errors if the optional "scripts" subdirectory did not
exist.

Diffstat:
Msrc/sty-list | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/sty-list b/src/sty-list @@ -81,8 +81,14 @@ shell() | sed -e 's/^\(.\{0,\}\)$/! -path \1 ! -path \1\/hooks/' \ | tr '\n' ' ')" - eval "exec find scripts ${search_dirs} \ - ! -path scripts ${_find_args} -type d -prune -o -name \"*.sh\" -print \ + _search_dirs="${search_dirs}" + if [ -d "scripts" ]; then + _search_dirs="scripts ${_search_dirs}" + _find_args="! -path scripts ${_find_args}" + fi + + eval "exec find ${_search_dirs} \ + ${_find_args} -type d -prune -o -name \"*.sh\" -print \ | sort" }