Skip to content
Snippets Groups Projects
adapt_html.sh 536 B
Newer Older
#!/bin/bash

baseurl="https://www.mat.tuhh.de"

for f in *.html
do 
  sed -i 's;windows-1252;utf-8;g' $f
  sed -i 's;iso-8859-1;utf-8;g' $f
#adapt paths
  #css
  sed -i 's;/include/css;css;g' $f 
  #images
  sed -i 's;/include/images;img;g' $f
  sed -i 's;"/index.html;"index.html;' $f
  #external links group
  #/forschung, informationen, lehre, studium, veranstaltungen 
  for string in forschung informationen lehre studium veranstaltungen
  do
    echo $string
    sed -i "s;\"/$string;\"$baseurl/$string;" $f
  done