/[clonezilla-sysresccd]/trunk/www/working/scripts/2site
ViewVC logotype

Diff of /trunk/www/working/scripts/2site

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/www/2site revision 37 by sng, Tue Mar 23 10:28:53 2010 UTC trunk/www/working/scripts/2site revision 44 by sng, Wed May 19 11:49:25 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  echo 'Creating files'  ####################################################################################
3  echo -n "  template.html...   "  #
4  myDate=`sed -n '1p' working/release-data `  # 2site, (C) 2007-2010 S. Georgaras <sng@hellug.gr>
5  myVersion=`sed -n '2p' working/release-data `  #
6  thisDate=`date '+%d/%m/%Y'`  # 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    
23    
24    ####################################################################################
25    # Configuration section
26    #
27    # Set whereIsTheISO to the location of current Clonezilla-SysRescCD ISO file
28    # Set whereIsTheTarBall to the location of current Clonezilla-SysRescCD TGZ file
29  whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion"/clonezilla-sysresccd-full-mod-"$myVersion".iso  whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion"/clonezilla-sysresccd-full-mod-"$myVersion".iso
30  whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion".iso  whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion".iso
31    
32  whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz  whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz
33    
34  # . "$HOME/.2site.conf"  ####################################################################################
 [ -e "$whereIsTheISO" ] && isoSize=$(du -h "$whereIsTheISO" | sed "s|/.*||" |sed 's|\([kMG]\).*| \1|') || {  
   echo "    Error: The variable \"whereIsTheISO\" is invalid  
                    Please edit your ~/.2site.conf file"  
 #   exit 1  
 }  
35    
36    
37    ####################################################################################
38    #                             Script starts here                                   #
39    ####################################################################################
40    cd ..
41    cd ..
42    echo 'Creating files'
43    echo -n "  template.html...   "
44    myDate=`sed -n '1p' working/release-data `
45    myVersion=`sed -n '2p' working/release-data `
46    thisDate=`date '+%d/%m/%Y'`
47  md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')"  md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')"
48  md5sum="$(cat "$md5sum")"  md5sum="$(cat "$md5sum")"
49    
# Line 30  tarballSizeEN=$(echo "$tarballSize" | se Line 56  tarballSizeEN=$(echo "$tarballSize" | se
56    
57    
58    
59  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.$$
60    
61  rm ~/tmp/aai.$$ 2>/dev/null  rm /tmp/aai.$$ 2>/dev/null
62  while read line;do  while read line;do
63  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|
64  s|Feb|02|  s|Feb|02|
# Line 48  s|Nov|11| Line 74  s|Nov|11|
74  s|Dec|12|  s|Dec|12|
75  ')"  ')"
76  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>||')"
77  echo "$dt - $tit" | grep '^[0-9]' >> ~/tmp/aai.$$  echo "$dt - $tit" | grep '^[0-9]' >> /tmp/aai.$$
78  done < ~/tmp/iaa.$$  done < /tmp/iaa.$$
79  rm ~/tmp/iaa.$$  rm /tmp/iaa.$$
80    
81  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|$| \\|')"
82    
83    
84    
85  rm ~/tmp/aai.$$  rm /tmp/aai.$$
86    
87  sed "/<H1[^>]*>What's New<.H1>/a \  sed "/<H1[^>]*>What's New<.H1>/a \
88  $l  $l
# Line 65  $l Line 91  $l
91    
92  echo 'done'  echo 'done'
93    
94  #  #############################################################################
95  # Create news.php  #                                                                           #
96  #  #                              Create news.php                              #
97    #                                                                           #
98    #############################################################################
99    
100  echo -n '  news.php...   '  echo -n '  news.php...   '
101  sed -n '1,/<div id="content">/p' template.html > 1.$$  sed -n '1,/<div id="content">/p' template.html > 1.$$
# Line 83  s|\"myTitle\"|What's New| Line 111  s|\"myTitle\"|What's New|
111  echo 'done'  echo 'done'
112    
113    
114  #  #############################################################################
115  # Create 404.html  #                                                                           #
116  #  #                               Create 404.html                             #
117    #                                                                           #
118    #############################################################################
119  echo -n '  404.html...   '  echo -n '  404.html...   '
120  sed -n '1,/<div id="content">/p' template.html > 1.$$  sed -n '1,/<div id="content">/p' template.html > 1.$$
121  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.$$
# Line 110  echo 'done' Line 140  echo 'done'
140    
141    
142    
143  #  #############################################################################
144  # Create files (main menu)  #                                                                           #
145  #  #                         Create files (main menu)                          #
146    #                                                                           #
147    #############################################################################
148  # 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
149  echo 'Creating menu files'  echo 'Creating menu files'
150  # for n in index.html screenshots.html help.html doc.html;do  # for n in index.html screenshots.html help.html doc.html;do
# Line 176  done Line 208  done
208    
209    
210    
211  # #Fix doc.html - Documentation menu  #############################################################################
212    #                                                                           #
213    #                    Fix doc.html - Documentation menu                      #
214    #                                                                           #
215    #############################################################################
216  # num=`grep -n  '<div id="linkline">' doc.html | sed 's|:.*||'`  # num=`grep -n  '<div id="linkline">' doc.html | sed 's|:.*||'`
217  #  #
218  # '  # '
# Line 277  sed "/<!-- docline-top-->/a \ Line 313  sed "/<!-- docline-top-->/a \
313    
314    
315    
316  # contents list for doc.html  #############################################################################
317    #                                                                           #
318    #                       contents list for doc.html                          #
319    #                                                                           #
320    #############################################################################
321  sed -n '/<[Hh][23]/p' "$n" | sed "1d  sed -n '/<[Hh][23]/p' "$n" | sed "1d
322  /<[Hh][0-9]>Clonezilla-SysRescCD<\/[Hh][0-9]>/d  /<[Hh][0-9]>Clonezilla-SysRescCD<\/[Hh][0-9]>/d
323  s|<[sS][pP][aA][nN].*</[sS][pP][aA][nN]>||  s|<[sS][pP][aA][nN].*</[sS][pP][aA][nN]>||

Legend:
Removed from v.37  
changed lines
  Added in v.44

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26