www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 28c998444d0f2616e83685424c1ddfddde325348
parent 7ef626ef85af398e04be86813ae85ed0a7ab9163
Author: Suzanne Soy <jsmaniac.github@suzanne.soy>
Date:   Fri, 30 Jul 2021 21:17:08 +0100

Rewrite URLs to js etc. files in the subdirectory

Diffstat:
Mfixlinks.sh | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/fixlinks.sh b/fixlinks.sh @@ -33,4 +33,11 @@ sed -i -e 's/href="index.html#/href="#/g' doc/phc-thesis/index.html cp doc/phc-thesis/index.html doc/index.html sed -i -e 's~"../pdf/~"pdf/~' doc/index.html sed -i -e 's~"../phc-thesis-/~"phc-thesis-/~' doc/index.html +set +x +for i in doc/phc-thesis/*; do + escaped_name="$(basename "$i" | sed -e 's~[]$.*/[\^]~\\&~g' )" + sed -i -e 's/\(href\|src\)="'"\($escaped_name\)"'"/\1="phc-thesis\/\2"/g' doc/index.html +done +set -x + sed -i -e '1i<!-- This file is a copy of ../index.html with the relative URLs adjusted, it is kept here so that the old URL …/phc-theis/index.html keeps working but the new URL …/index.html should be used. -->' doc/phc-thesis/index.html