File: fix-doc.sh

package info (click to toggle)
scite 4.4.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,928 kB
  • sloc: cpp: 145,539; ansic: 19,277; python: 6,120; makefile: 806; perl: 200; sh: 184; sql: 160; objc: 18; ruby: 6; tcl: 6; php: 4
file content (20 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

#set -x
set -e

DOCDIR=debian/scite/usr/share/scite
#DOCDIR=scite/doc

for htmlfile in ${DOCDIR}/*.html
do
    for f in ${DOCDIR}/*.html ${DOCDIR}/*.png ${DOCDIR}/*.jpg
    do
        fname=$(basename $f)
        sed -i -r \
            -e "s|href=\"https?://www.scintilla.org/${fname}|href=\"${fname}|gI" \
            -e "s|url\(https?://www.scintilla.org/${fname}\)|url(${fname})|gI" \
            -e "s|src=\"https?://(www\.)?scintilla.org/${fname}|src=\"${fname}|gI" \
            ${htmlfile}
    done
done