forked from MEGA65/mega65-user-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenhtml.sh
More file actions
executable file
·27 lines (22 loc) · 759 Bytes
/
Copy pathgenhtml.sh
File metadata and controls
executable file
·27 lines (22 loc) · 759 Bytes
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
#!/bin/bash
echo "<html><h1>MEGA65 Documentation</h1>" > index.html
echo '<p><u>Last updated at</u> <b>' >> index.html
date >> index.html
echo "</b></p><pre>" >> index.html
git log -1 >> index.html
echo "</pre><ul>" >> index.html
echo "</ul><p><b><u>PDF files</u></b>:</p><ul>" >> index.html
PDFS=`ls -S *.pdf`
for file in $PDFS; do
LOG=`basename -s .pdf $file`.log
PAGES=`tail -1 $LOG | sed 's/.*\((.*)\).*/\1/'`
echo "<li><a href=\"$file\">$file</a> $PAGES</li>" >> index.html
done
echo "</ul><p><b><u>Log files</u></b>:</p><ul>" >> index.html
LOGS=`ls -S *.log`
for file in $LOGS; do
SIZE=`ls -sh $file | cut -d' ' -f 1`
echo "<li><a href=\"$file\">$file</a> ($SIZE)</li>" >> index.html
done
echo "</ul></html>" >> index.html
cat index.html