#! /bin/sh

#
# Adjust the paths to images used from html pages.
#


find ../doc/html -name "*.html" | sed "s/^.*$/sed -f script.sed & > htmlfile.txt\ndtou htmlfile.txt\ncmp htmlfile.txt &\nif [ \$? != 0 ]; then\n  touch -r & htmlfile.txt\n  mv -vf htmlfile.txt &\nfi\n/" > 1.txt

cat > script.sed << EOS
/img src="/ {
  /\\.\\.\\/.*\\.gif"/ s|\\.\\./|./|g
  /\\.\\.\\/.*\\.png"/ s|\\.\\./|./|g
}
EOS

. ./1.txt

rm -f 1.txt script.sed
