/[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

revision 44 by sng, Wed May 19 11:49:25 2010 UTC revision 49 by sng, Thu May 20 15:43:26 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  ####################################################################################  ##############################################################################
3  #  #                                                                            #
4  # 2site, (C) 2007-2010 S. Georgaras <sng@hellug.gr>  # 2site, (C) 2007-2010 S. Georgaras <sng@hellug.gr>                          #
5  #  #                                                                            #
6  # This file is part of Clonezilla-SysRescCD.  # This file is part of Clonezilla-SysRescCD.                                 #
7  #  #                                                                            #
8  # Clonezilla-SysRescCD is free software: you can redistribute it and/or modify  # Clonezilla-SysRescCD is free software: you can redistribute it and/or      #
9  # it under the terms of the GNU General Public License as published by  # modify it under the terms of the GNU General Public License as published   #
10  # the Free Software Foundation, either version 2 of the License, or  # by the Free Software Foundation, either version 2 of the License, or       #
11  # (at your option) any later version.  # (at your option) any later version.                                        #
12  #  #                                                                            #
13  # Clonezilla-SysRescCD is distributed in the hope that it will be useful,  # Clonezilla-SysRescCD is distributed in the hope that it will be useful,    #
14  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of             #
15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
16  # GNU General Public License for more details.  # GNU General Public License for more details.                               #
17  #  #                                                                            #
18  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License along    #
19  # along with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>.  # with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>.     #
20  #  #                                                                            #
21  ####################################################################################  ##############################################################################
22    
23    
24  ####################################################################################  ##############################################################################
25  # Configuration section  # Configuration section
26  #  #
27  # Set whereIsTheISO to the location of current Clonezilla-SysRescCD ISO file  # Set whereIsTheISO to the location of current Clonezilla-SysRescCD ISO file
# Line 31  whereIsTheISO=/e/clonezilla-sysresccd-fu Line 31  whereIsTheISO=/e/clonezilla-sysresccd-fu
31    
32  whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz  whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz
33    
34  ####################################################################################  ##############################################################################
35    #                             Script starts here                             #
36    ##############################################################################
37    
38  ####################################################################################  # Go to www/ directory
 #                             Script starts here                                   #  
 ####################################################################################  
39  cd ..  cd ..
40  cd ..  cd ..
41  echo 'Creating files'  echo 'Creating files'
# Line 86  rm /tmp/aai.$$ Line 85  rm /tmp/aai.$$
85    
86  sed "/<H1[^>]*>What's New<.H1>/a \  sed "/<H1[^>]*>What's New<.H1>/a \
87  $l  $l
88  " .template.html | sed "s|\"myDate\"|$myDate|" | sed "s|\"myVersion\"|$myVersion|g" | sed "s|Last update: [^<]*<|Last update: $thisDate<|" > template.html  " working/.template.html | sed "s|\"myDate\"|$myDate|" | sed "s|\"myVersion\"|$myVersion|g" | sed "s|Last update: [^<]*<|Last update: $thisDate<|" > template.html
89    
90    
91  echo 'done'  echo 'done'
# Line 99  echo 'done' Line 98  echo 'done'
98    
99  echo -n '  news.php...   '  echo -n '  news.php...   '
100  sed -n '1,/<div id="content">/p' template.html > 1.$$  sed -n '1,/<div id="content">/p' template.html > 1.$$
101  cat .news.php >> 1.$$  cat working/.news.php >> 1.$$
102  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.$$
103    
104  sed '/#content/s/width: 750px;/width: 950px/' 1.$$ | sed "s|background-image: url('images/line.png'); background-repeat:repeat-y;||  sed '/#content/s/width: 750px;/width: 950px/' 1.$$ | sed "s|background-image: url('images/line.png'); background-repeat:repeat-y;||
# Line 127  s|#content { float: left;|#content { | Line 126  s|#content { float: left;|#content { |
126  rm 1.$$  rm 1.$$
127    
128  sed -n '1,/<.[hH][eE][aA][dD]>/p' xxx.html | sed '$d' > p1.$$  sed -n '1,/<.[hH][eE][aA][dD]>/p' xxx.html | sed '$d' > p1.$$
129  sed -n '1,/<!--seperator-->/p' .404.html >> p1.$$  sed -n '1,/<!--seperator-->/p' working/.404.html >> p1.$$
130  sed -n '/<.[hH][eE][aA][dD]>/,$p' xxx.html >> p1.$$  sed -n '/<.[hH][eE][aA][dD]>/,$p' xxx.html >> p1.$$
131  mv p1.$$ xxx.html  mv p1.$$ xxx.html
132    
133  sed -n '1,/<[dD][iI][vV] [iI][dD]="content">/p' xxx.html> p1.$$  sed -n '1,/<[dD][iI][vV] [iI][dD]="content">/p' xxx.html> p1.$$
134  sed '1,/<!--seperator-->/d' .404.html >> p1.$$  sed '1,/<!--seperator-->/d' working/.404.html >> p1.$$
135  sed -n '/<[dD][iI][vV] [iI][dD]="content">/,$p' xxx.html | sed '1d'  >> p1.$$  sed -n '/<[dD][iI][vV] [iI][dD]="content">/,$p' xxx.html | sed '1d'  >> p1.$$
136  sed '/<!--seperator-->/d' p1.$$ > 404.html  sed '/<!--seperator-->/d' p1.$$ > 404.html
137  rm *.$$ xxx.html  rm *.$$ xxx.html

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

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26