1 |
#!/bin/bash |
2 |
############################################################################## |
3 |
# # |
4 |
# html2doc, (C) 2007-2010 S. Georgaras <sng@hellug.gr> # |
5 |
# # |
6 |
# This file is part of Clonezilla-SysRescCD. # |
7 |
# # |
8 |
# Clonezilla-SysRescCD is free software: you can redistribute it and/or # |
9 |
# modify it under the terms of the GNU General Public License as published # |
10 |
# by the Free Software Foundation, either version 2 of the License, or # |
11 |
# (at your option) any later version. # |
12 |
# # |
13 |
# Clonezilla-SysRescCD is distributed in the hope that it will be useful, # |
14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
16 |
# GNU General Public License for more details. # |
17 |
# # |
18 |
# You should have received a copy of the GNU General Public License along # |
19 |
# with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>. # |
20 |
# # |
21 |
############################################################################## |
22 |
|
23 |
|
24 |
|
25 |
############################################################################## |
26 |
# Configuration section |
27 |
# |
28 |
# Set whereIsTheISO to the location of current Clonezilla-SysRescCD ISO file |
29 |
# Set whereIsTheTarBall to the location of current Clonezilla-SysRescCD TGZ file |
30 |
whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion"/clonezilla-sysresccd-full-mod-"$myVersion".iso |
31 |
whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion".iso |
32 |
|
33 |
whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz |
34 |
|
35 |
# Go to www/ directory |
36 |
cd .. |
37 |
cd .. |
38 |
for n in usb.html \ |
39 |
boot-params.html \ |
40 |
clonezilla.html \ |
41 |
backup.html \ |
42 |
backup-smb.html \ |
43 |
restoration.html \ |
44 |
restore.html \ |
45 |
restore-burn.html \ |
46 |
reloc-img.html \ |
47 |
supergrubdisk.html \ |
48 |
oldboot.html \ |
49 |
sysresccd.html \ |
50 |
partitions.html \ |
51 |
recover.html \ |
52 |
own-scripts.html \ |
53 |
annex-a-devices.html \ |
54 |
doc.html |
55 |
|
56 |
do |
57 |
cp $n 2doc |
58 |
done |
59 |
|
60 |
cd 2doc |
61 |
mkdir doc 2>/dev/null |
62 |
mv doc.html README.html |
63 |
|
64 |
for n in *.html;do |
65 |
sed ' |
66 |
s{"doc.html"{"README.html"{g |
67 |
s{<a href="news.php">News</a>{{ |
68 |
s{^[ \t]*<a href="index.html#download">Download</a>{{ |
69 |
s{^[ \t]*<a href="index.html#credits">Credits</a>{{ |
70 |
s{^[ \t]*<a href="index.html">Home</a>{{ |
71 |
s{^[ \t]*<a href="help.html">Help</a>{{ |
72 |
s{^[ \t]*<a href="screenshots.html">Screenshots</a>{{ |
73 |
s{[hH][rR][Ee][fF]="README.html"{href="../README.html"{g |
74 |
s{>Documentation<{>Offline Documentation<{ |
75 |
s{Documentation:{Offline Documentation:{ |
76 |
/<div id="rss">/ , /<.div>/ d |
77 |
/<div id="lphp"/d |
78 |
' "$n" > doc/"$n" |
79 |
rm "$n" |
80 |
done |
81 |
|
82 |
|
83 |
# Fixing README.html |
84 |
sed ' |
85 |
s{[hH][rR][Ee][fF]="\.\./README.html"{href="README.html"{g |
86 |
s{<[aA] [hH][rR][Ee][fF]="\([^"]*\)">\([^<]*\)</a><[bB][rR][^>]*>{<a href="doc/\1">\2</a><br>{ |
87 |
|
88 |
s{\(.\)images/{\1doc/images/{g |
89 |
s{doc/images/line.png{{ |
90 |
|
91 |
/<div id="menu">/,/<.div>/d |
92 |
/<div id="footer">/i \ |
93 |
</div> |
94 |
|
95 |
' doc/README.html > README.html |
96 |
rm doc/README.html |
97 |
|
98 |
|
99 |
# At this point we should be in 2doc/ |
100 |
# go back to scripts/ directory |
101 |
cd ../working/scripts |
102 |
./html2txt |
103 |
|
104 |
# finally tar them all together |
105 |
|
106 |
cd ../../2doc |
107 |
pwd |
108 |
tar --exclude=.svn -czf ../doc.tar.gz * |
109 |
cp ../doc.tar.gz ../../create-clonezilla-sysresccd/files |
110 |
|