-
Notifications
You must be signed in to change notification settings - Fork 0
/
makehtml
executable file
·42 lines (31 loc) · 1.14 KB
/
makehtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo "Usage: $(basename $BASH_SOURCE) [fileprefix ...]"
exit 1
fi
for prefix in "$@"; do
if [[ -e $prefix.html ]]; then
echo "$prefix.html already exists!"
exit 2
fi
done
for prefix in "$@"; do
cat >$prefix.html <<EOF
<!doctype html>
<html>
<head>
<title>$prefix</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<!-- UNCOMMENT FOR REACT
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="your-script-here.js"></script>
-->
</body>
</html>
EOF
done