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 aaef4dee640738b9fd9a7a39a4ed76669023cb27
parent 1db0cb932a73515684bcc6b2ebffc3b14631ca78
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat, 27 Apr 2024 15:35:56 +0200

fix links if readme is used

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

diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -12,12 +12,13 @@ stagit "${1}/${2}/${3}.git" mkdir -p "${1}/${2}/${3}/files" 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 - find "${1}/${2}/${3}/file" \ - -type f \ - -name "README*.html" \ - -exec ln -sf {} "${1}/${2}/${3}/index.html" \; + # use readme as index + cp "${1}/${2}/${3}/file/README*.html" "${1}/${2}/${3}/index.html" + # adjust relative paths accordingly + sed -e 's/\.\.\///g' -i "${1}/${2}/${3}/index.html" fi # Protect Mail-Adresses in HTML