1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
#################################################################################### |
3 |
|
# |
4 |
|
# 2site, (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 modify |
9 |
|
# it under the terms of the GNU General Public License as published by |
10 |
|
# 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 |
19 |
|
# along with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>. |
20 |
|
# |
21 |
|
#################################################################################### |
22 |
|
cd .. |
23 |
|
cd .. |
24 |
echo 'Creating files' |
echo 'Creating files' |
25 |
echo -n " template.html... " |
echo -n " template.html... " |
26 |
myDate=`sed -n '1p' working/release-data ` |
myDate=`sed -n '1p' working/release-data ` |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
tr -d '\n' < working/clonezilla-sysresccd.rss | sed 's|<[tT][iI][tT][lL][eE]>|\n<title>|g' | sed 's|</[pP][uU][bB][Dd][aA][tT][eE]>|</pubDate>\n|g' | grep '<title>' > ~/tmp/iaa.$$ |
tr -d '\n' < working/clonezilla-sysresccd.rss | sed 's|<[tT][iI][tT][lL][eE]>|\n<title>|g' | sed 's|</[pP][uU][bB][Dd][aA][tT][eE]>|</pubDate>\n|g' | grep '<title>' > /tmp/iaa.$$ |
56 |
|
|
57 |
rm ~/tmp/aai.$$ 2>/dev/null |
rm /tmp/aai.$$ 2>/dev/null |
58 |
while read line;do |
while read line;do |
59 |
dt="$(echo "$line" | sed 's|.*<guid isPermaLink="false">.*, ||' |sed 's| [0-9][0-9]:.*||' | sed 's|.*<pubDate>..., ||'| sed 's|\([^ ]*\) \([^ ]*\) \(.*\)|\3 \2 \1|' | sed 's|Jan|01| |
dt="$(echo "$line" | sed 's|.*<guid isPermaLink="false">.*, ||' |sed 's| [0-9][0-9]:.*||' | sed 's|.*<pubDate>..., ||'| sed 's|\([^ ]*\) \([^ ]*\) \(.*\)|\3 \2 \1|' | sed 's|Jan|01| |
60 |
s|Feb|02| |
s|Feb|02| |
70 |
s|Dec|12| |
s|Dec|12| |
71 |
')" |
')" |
72 |
tit="$(echo "$line" | sed 's|</[Tt][iI][tT][lL][eE]>.*||' | sed 's|<title>||')" |
tit="$(echo "$line" | sed 's|</[Tt][iI][tT][lL][eE]>.*||' | sed 's|<title>||')" |
73 |
echo "$dt - $tit" | grep '^[0-9]' >> ~/tmp/aai.$$ |
echo "$dt - $tit" | grep '^[0-9]' >> /tmp/aai.$$ |
74 |
done < ~/tmp/iaa.$$ |
done < /tmp/iaa.$$ |
75 |
rm ~/tmp/iaa.$$ |
rm /tmp/iaa.$$ |
76 |
|
|
77 |
l="$(cat ~/tmp/aai.$$ | sort -r | sed 's|^\([0-9][0-9][0-9][0-9]\) \([0-9][0-9]\) \([0-9][0-9]\) - \(.*\)|<p><a href="news.php#\4">\3/\2/\1 - \4</a></p>|' | sed -n '1,$p' | sed 's|$| \\|')" |
l="$(cat /tmp/aai.$$ | sort -r | sed 's|^\([0-9][0-9][0-9][0-9]\) \([0-9][0-9]\) \([0-9][0-9]\) - \(.*\)|<p><a href="news.php#\4">\3/\2/\1 - \4</a></p>|' | sed -n '1,$p' | sed 's|$| \\|')" |
78 |
|
|
79 |
|
|
80 |
|
|
81 |
rm ~/tmp/aai.$$ |
rm /tmp/aai.$$ |
82 |
|
|
83 |
sed "/<H1[^>]*>What's New<.H1>/a \ |
sed "/<H1[^>]*>What's New<.H1>/a \ |
84 |
$l |
$l |
87 |
|
|
88 |
echo 'done' |
echo 'done' |
89 |
|
|
90 |
# |
############################################################################# |
91 |
# Create news.php |
# # |
92 |
# |
# Create news.php # |
93 |
|
# # |
94 |
|
############################################################################# |
95 |
|
|
96 |
echo -n ' news.php... ' |
echo -n ' news.php... ' |
97 |
sed -n '1,/<div id="content">/p' template.html > 1.$$ |
sed -n '1,/<div id="content">/p' template.html > 1.$$ |
107 |
echo 'done' |
echo 'done' |
108 |
|
|
109 |
|
|
110 |
# |
############################################################################# |
111 |
# Create 404.html |
# # |
112 |
# |
# Create 404.html # |
113 |
|
# # |
114 |
|
############################################################################# |
115 |
echo -n ' 404.html... ' |
echo -n ' 404.html... ' |
116 |
sed -n '1,/<div id="content">/p' template.html > 1.$$ |
sed -n '1,/<div id="content">/p' template.html > 1.$$ |
117 |
sed '1,/<div id="content">/d' template.html | sed '/<div id="menu">/,/<.div>/d' >> 1.$$ |
sed '1,/<div id="content">/d' template.html | sed '/<div id="menu">/,/<.div>/d' >> 1.$$ |
136 |
|
|
137 |
|
|
138 |
|
|
139 |
# |
############################################################################# |
140 |
# Create files (main menu) |
# # |
141 |
# |
# Create files (main menu) # |
142 |
|
# # |
143 |
|
############################################################################# |
144 |
# for n in index.html features.html doc.html download.html screenshots.html credits.html links.html;do |
# for n in index.html features.html doc.html download.html screenshots.html credits.html links.html;do |
145 |
echo 'Creating menu files' |
echo 'Creating menu files' |
146 |
# for n in index.html screenshots.html help.html doc.html;do |
# for n in index.html screenshots.html help.html doc.html;do |
204 |
|
|
205 |
|
|
206 |
|
|
207 |
# #Fix doc.html - Documentation menu |
############################################################################# |
208 |
|
# # |
209 |
|
# Fix doc.html - Documentation menu # |
210 |
|
# # |
211 |
|
############################################################################# |
212 |
# num=`grep -n '<div id="linkline">' doc.html | sed 's|:.*||'` |
# num=`grep -n '<div id="linkline">' doc.html | sed 's|:.*||'` |
213 |
# |
# |
214 |
# ' |
# ' |
309 |
|
|
310 |
|
|
311 |
|
|
312 |
# contents list for doc.html |
############################################################################# |
313 |
|
# # |
314 |
|
# contents list for doc.html # |
315 |
|
# # |
316 |
|
############################################################################# |
317 |
sed -n '/<[Hh][23]/p' "$n" | sed "1d |
sed -n '/<[Hh][23]/p' "$n" | sed "1d |
318 |
/<[Hh][0-9]>Clonezilla-SysRescCD<\/[Hh][0-9]>/d |
/<[Hh][0-9]>Clonezilla-SysRescCD<\/[Hh][0-9]>/d |
319 |
s|<[sS][pP][aA][nN].*</[sS][pP][aA][nN]>|| |
s|<[sS][pP][aA][nN].*</[sS][pP][aA][nN]>|| |