summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfix-website.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/fix-website.sh b/fix-website.sh
index 8d552e6..8de202e 100755
--- a/fix-website.sh
+++ b/fix-website.sh
@@ -11,7 +11,12 @@ mkdir -p "$destdir"
for n in *.html; do
echo fixing "$n"
- sed <"$n" >"$destdir/${n//_005f/_}" \
+ out="${n//_005f/_}"
+ name="${out%%.html}"
+ sed <"$n" \
+ -e 's|<html lang="en">|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd"><html lang="en">|' \
+ -e "s|<a name=\"${name}\"></a>||" \
-e 's|_005f|_|g' \
- -e 's|href="../index.html#dir">(dir)</a>|href="http://savannah.nongnu.org/projects/autoconf-archive/">Home Page at Savannah</a>|g'
+ -e 's|href="../index.html#dir">(dir)</a>|href="http://savannah.nongnu.org/projects/autoconf-archive/">Home Page at Savannah</a>|g' \
+ | tidy >"$destdir/${out}" -q --indent yes --indent-spaces 1 -wrap 80 --tidy-mark no --hide-comments yes
done