Mercurial > hg > aboriginal
annotate www/screenshots/screenshots.sh @ 1565:afb74399bf27
Uncomment screenshot generation and bump initial delay up to 20 seconds (what powerpc needs on my slow netbook).
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 17 Nov 2012 21:39:53 -0600 |
parents | 51d23189cb66 |
children |
rev | line source |
---|---|
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
1002
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
3 # Take 80x25 screen shot from the end of a text file, and excape it for html. |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
4 |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
5 process_text_file() |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
6 { |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
7 X=0 |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
8 |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
9 # Break into 80 line chunks, substituting &, < and > |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
10 sed -e 's/\(................................................................................\)/\1\n/g' "$1" | \ |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
11 tail -n 25 | while read i |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
12 do |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
13 echo -n "$i" | sed -e 's@\&@\&@g' -e 's@<@\<@g' -e 's@>@\>@g' |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
14 |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
15 # If the first line is shorter than 80 characters, pad it. |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
16 if [ $X -eq 0 ] |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
17 then |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
18 X=${#i} |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
19 while [ $X -lt 80 ] |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
20 do |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
21 echo -n ' ' |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
22 X=$[$X+1] |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
23 done |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
24 fi |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
25 echo |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
26 done |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
27 } |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
28 |
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
29 wrap_screenshot() |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 { |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 echo '</center></td></tr><tr>' |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 cat << EOF |
1562
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
34 <td> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
35 <a href=bootlog-$1.txt>boot log</a></li> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
36 <a href=../bin/cross-compiler-$1.tar.bz2>cross compiler</a><br> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
37 <a href=../bin/native-compiler-$1.tar.bz2>native compiler</a><br> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
38 <a href=../bin/root-filesystem-$1.tar.bz2>root filesystem</a><br> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
39 <a href=../bin/system-image-$1.tar.bz2>system image</a><br> |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
41 <hr /> |
1562
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
42 <a href=../bin/busybox-$1>busybox binary</a><br> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
43 <a href=../bin/dropbearmulti-$1>dropbear binary</a><br> |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
44 <a href=../bin/strace-$1>strace binary</a><br> |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 </ul></td> |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 EOF |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 echo '<td>' |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 echo '<table bgcolor=#000000><tr><td><font color=#ffffff size=-2><pre>' |
1562
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
50 process_text_file "bootlog-$1.txt" |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 echo '</pre></font></td></tr></table></td>' |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
52 echo |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
53 echo '</tr></table></td>' |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 } |
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
55 |
1562
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
56 # Harvest screenshots from each system image |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
57 |
1565
afb74399bf27
Uncomment screenshot generation and bump initial delay up to 20 seconds (what powerpc needs on my slow netbook).
Rob Landley <rob@landley.net>
parents:
1562
diff
changeset
|
58 more/for-each-target.sh '(sleep 20 && echo -n cat "/proc" && sleep 1 && echo /cpuinfo && sleep 2 && echo exit) | more/run-emulator-from-build.sh $TARGET | tee www/screenshots/bootlog-$TARGET.txt' |
1562
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
59 |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
60 cd www/screenshots |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
61 |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
62 # Filter out escape sequence (shell asking the current screen size) |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
63 sed -i $(echo -e 's/\033\[6n//g;s/\015$//') bootlog-*.txt |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
64 |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
65 # Create html snippet |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
66 |
51d23189cb66
Infrastructure to recreate screenshots directory.
Rob Landley <rob@landley.net>
parents:
1002
diff
changeset
|
67 for i in $(ls bootlog-*.txt | sed 's/bootlog-\(.*\)\.txt/\1/') |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
68 do |
1002
a835d605cb85
Get screenshots working again. (Conversion to Vladimir Dronnikov's new layout underway, just going slowly...)
Rob Landley <rob@landley.net>
parents:
886
diff
changeset
|
69 wrap_screenshot "$i" > "screenshot-$i.html" |
886
290e12307505
Update screenshot index, and check in script to generate each architecture's section.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
70 done |