pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit d0ef3132665968c55725005c734f122301bb297c
parent 8085021b113e95e2b0551981949b4bd976b988b7
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat, 27 Apr 2024 15:59:35 +0200

use "find" to locate README files

Diffstat:
Mbin/git_update_repo_html.sh | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -21,14 +21,16 @@ cd "${1}/${2}/${3}" # build HTML stagit "${1}/${2}/${3}.git" -mkdir -p "${1}/${2}/${3}/file" if [ -z $(find "${1}/${2}/${3}/file/" -type f -name "README*.html") ]; then # use log.html as index ln -sf "${1}/${2}/${3}/log.html" "${1}/${2}/${3}/index.html" else # use readme as index - cp "${1}/${2}/${3}/file/README*.html" "${1}/${2}/${3}/index.html" + file "${1}/${2}/${3}/file/" \ + -type f \ + -name "README*.html" \ + -exec cp {} "${1}/${2}/${3}/index.html" \; # adjust relative paths accordingly sed -e 's/\.\.\///g' -i "${1}/${2}/${3}/index.html" fi