File: fix_javadoc_links.sh

package info (click to toggle)
owasp-java-html-sanitizer 20191001.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,580 kB
  • sloc: javascript: 39,520; java: 16,303; xml: 561; sh: 120; makefile: 2
file content (14 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

set -e

export VERSION="$1"

if [ -z "$VERSION" ]; then
    echo "Usage: $0 <maven-version>"
    exit 1
fi

find docs README.md -name \*.md | \
    xargs perl -i~ -pe \
        's@\bhttps?://static[.]javadoc[.]io/com[.]googlecode[.]owasp-java-html-sanitizer/owasp-java-html-sanitizer/(?:[\w.\-]+)/(\w+)@https://static.javadoc.io/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/'"$VERSION"'/$1@'