File: replace-mathjax-cloudflare-url-local-file.sh

package info (click to toggle)
isospec 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,452 kB
  • sloc: cpp: 9,257; python: 2,065; makefile: 180; ansic: 100; sh: 86
file content (13 lines) | stat: -rwxr-xr-x 348 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

cd man/html

for file in *.html
do
	grep -i "src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/[0-9].[0-9].[0-9]/MathJax.js\"" ${file}

	if [ "$?" = "0" ]
	then
		sed -i 's|src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/\([0-9].[0-9].[0-9]\)/MathJax.js\"|src="file:///usr/share/javascript/mathjax/MathJax.js"|' ${file} 
	fi
done