/[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 42 by sng, Tue May 18 14:22:00 2010 UTC revision 45 by sng, Wed May 19 15:03:43 2010 UTC
# Line 19  Line 19 
19  # along with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>.  # along with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>.
20  #  #
21  ####################################################################################  ####################################################################################
 cd ..  
 cd ..  
 echo 'Creating files'  
 echo -n "  template.html...   "  
 myDate=`sed -n '1p' working/release-data `  
 myVersion=`sed -n '2p' working/release-data `  
 thisDate=`date '+%d/%m/%Y'`  
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"  ####################################################################################
35  [ -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  
 }  
36    
37    ####################################################################################
38    #                             Script starts here                                   #
39    ####################################################################################
40    
41    # Go to www/ directory
42    cd ..
43    cd ..
44    echo 'Creating files'
45    echo -n "  template.html...   "
46    myDate=`sed -n '1p' working/release-data `
47    myVersion=`sed -n '2p' working/release-data `
48    thisDate=`date '+%d/%m/%Y'`
49  md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')"  md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')"
50  md5sum="$(cat "$md5sum")"  md5sum="$(cat "$md5sum")"
51    
# Line 82  rm /tmp/aai.$$ Line 88  rm /tmp/aai.$$
88    
89  sed "/<H1[^>]*>What's New<.H1>/a \  sed "/<H1[^>]*>What's New<.H1>/a \
90  $l  $l
91  " .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
92    
93    
94  echo 'done'  echo 'done'
# Line 95  echo 'done' Line 101  echo 'done'
101    
102  echo -n '  news.php...   '  echo -n '  news.php...   '
103  sed -n '1,/<div id="content">/p' template.html > 1.$$  sed -n '1,/<div id="content">/p' template.html > 1.$$
104  cat .news.php >> 1.$$  cat working/.news.php >> 1.$$
105  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.$$
106    
107  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 123  s|#content { float: left;|#content { | Line 129  s|#content { float: left;|#content { |
129  rm 1.$$  rm 1.$$
130    
131  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.$$
132  sed -n '1,/<!--seperator-->/p' .404.html >> p1.$$  sed -n '1,/<!--seperator-->/p' working/.404.html >> p1.$$
133  sed -n '/<.[hH][eE][aA][dD]>/,$p' xxx.html >> p1.$$  sed -n '/<.[hH][eE][aA][dD]>/,$p' xxx.html >> p1.$$
134  mv p1.$$ xxx.html  mv p1.$$ xxx.html
135    
136  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.$$
137  sed '1,/<!--seperator-->/d' .404.html >> p1.$$  sed '1,/<!--seperator-->/d' working/.404.html >> p1.$$
138  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.$$
139  sed '/<!--seperator-->/d' p1.$$ > 404.html  sed '/<!--seperator-->/d' p1.$$ > 404.html
140  rm *.$$ xxx.html  rm *.$$ xxx.html

Legend:
Removed from v.42  
changed lines
  Added in v.45

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26