--- trunk/www/working/scripts/2site 2010/05/20 11:24:47 46 +++ trunk/www/working/scripts/2site 2010/09/16 13:06:07 122 @@ -20,23 +20,28 @@ # # ############################################################################## - +pushd "$PWD" ############################################################################## # Configuration section # # Set whereIsTheISO to the location of current Clonezilla-SysRescCD ISO file # Set whereIsTheTarBall to the location of current Clonezilla-SysRescCD TGZ file -whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion"/clonezilla-sysresccd-full-mod-"$myVersion".iso -whereIsTheISO=/e/clonezilla-sysresccd-full-mod-"$myVersion".iso - -whereIsTheTarBall=/home/spiros/multibootcd/create-clonezilla-sysresccd-"$myVersion".tar.gz - -############################################################################## - +whereIsTheISO=/e/clonezilla-sysresccd-"$myVersion" ############################################################################## # Script starts here # ############################################################################## +noDoc=1 +while getopts "d:n" Option +do + case $Option in + d) thisDate="$OPTARG" + ;; + n) unset noDoc;; + esac +done +./pack-them + # Go to www/ directory cd .. @@ -45,9 +50,18 @@ echo -n " template.html... " myDate=`sed -n '1p' working/release-data ` myVersion=`sed -n '2p' working/release-data ` -thisDate=`date '+%d/%m/%Y'` -md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')" -md5sum="$(cat "$md5sum")" +if [ -z "$thisDate" ];then + thisDate=`date '+%d/%m/%Y'` +fi + +whereIsTheISO="$whereIsTheISO""$myVersion" +whereIsTheTarBall="$whereIsTheISO"/create-clonezilla-sysresccd-"$myVersion".tar.gz +ISO_I686_SIZE=`du -h "$whereIsTheISO"/clonezilla-sysresccd-i686-"$myVersion"/clonezilla-sysresccd-i686-"$myVersion".iso | sed 's|[ \t].*||'` +ISO_I686_MD5=`cat "$whereIsTheISO"/clonezilla-sysresccd-i686-"$myVersion"/md5sum.txt | sed 's|[ \t].*||'` +ISO_AMD64_SIZE=`du -h "$whereIsTheISO"/clonezilla-sysresccd-amd64-"$myVersion"/clonezilla-sysresccd-amd64-"$myVersion".iso | sed 's|[ \t].*||'` +ISO_AMD64_MD5=`cat "$whereIsTheISO"/clonezilla-sysresccd-amd64-"$myVersion"/md5sum.txt | sed 's|[ \t].*||'` +ISO_I486_SIZE=`du -h "$whereIsTheISO"/clonezilla-sysresccd-i486-"$myVersion"/clonezilla-sysresccd-i486-"$myVersion".iso | sed 's|[ \t].*||'` +ISO_I486_MD5=`cat "$whereIsTheISO"/clonezilla-sysresccd-i486-"$myVersion"/md5sum.txt | sed 's|[ \t].*||'` tarballSize=$(du -h "$whereIsTheTarBall" | sed "s|/.*||" |sed 's|\([kMG]\).*| \1|') isoSizeEN=$(echo "$isoSize" | sed 's|,|.|') @@ -56,8 +70,24 @@ # tarballSizeGR=$(echo "$tarballSize" | sed 's|\.|,|') +############################################################################# +# +# Copy RSS feed to trunk. No manipulation!!! +# +############################################################################# +pwd +cd working +cp clonezilla-sysresccd.rss .. +cd .. + +############################################################################# +# +# Create template.html +# +############################################################################# + tr -d '\n' < working/clonezilla-sysresccd.rss | sed 's|<[tT][iI][tT][lL][eE]>|\n|g' | sed 's|</[pP][uU][bB][Dd][aA][tT][eE]>|</pubDate>\n|g' | grep '<title>' > /tmp/iaa.$$ rm /tmp/aai.$$ 2>/dev/null @@ -93,6 +123,7 @@ echo 'done' + ############################################################################# # # # Create news.php # @@ -136,7 +167,7 @@ sed -n '1,/<[dD][iI][vV] [iI][dD]="content">/p' xxx.html> p1.$$ sed '1,/<!--seperator-->/d' working/.404.html >> p1.$$ sed -n '/<[dD][iI][vV] [iI][dD]="content">/,$p' xxx.html | sed '1d' >> p1.$$ -sed '/<!--seperator-->/d' p1.$$ > 404.html +sed '/<!--seperator-->/d' p1.$$ | sed "s|myVersion|"$myVersion"|g" > 404.html rm *.$$ xxx.html echo 'done' @@ -195,8 +226,14 @@ s/<!--txt-only-->.*<!--end-txt-only-->//' tpm.$$ | sed 's| $||' | sed "s|\"myTitle\"|$myTitle| s|\"myVersion\"|$myVersion|g s|TARBALL_SIZE|$tarballSizeEN|g -s|ISO_SIZE|$isoSizeEN|g -s|\"MD5SUM\"|$md5sum| + +s{ISO_I686_SIZE{$ISO_I686_SIZE{g +s{ISO_I686_MD5{$ISO_I686_MD5{g +s{ISO_I486_SIZE{$ISO_I486_SIZE{g +s{ISO_I486_MD5{$ISO_I486_MD5{g +s{ISO_AMD64_SIZE{$ISO_AMD64_SIZE{g +s{ISO_AMD64_MD5{$ISO_AMD64_MD5{g + /<[hH]1>.*<[bB][rR]/d s|class=\"here\" || s|<a href=\"$fonly\">|<a class=\"here\" href=\"$fonly\">| @@ -404,3 +441,30 @@ rm onepage-tmp.html 2>/dev/null + + +############################################################################# +# # +# Fix download.html warning versions # +# # +############################################################################# +verLineIndex=`grep bordertable index.html | grep "$myversion"| grep '[0-9][0-9]*/[0-9][0-9]/[0-9][0-9]' |sed "s|.*"$myVersion"||" | sed 's/"]//g' | sed -n '1p'` + + +CLONEZILLA_VERSION=`echo "$verLineIndex" | sed 's|.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-[0-9][0-9]*\).*|\1|'` +verLineIndex=`echo "$verLineIndex" | sed "s|.*$CLONEZILLA_VERSION||"` +SYSRESCCD_VERSION=`echo "$verLineIndex" | sed 's|.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|'` +sed " +s/CLONEZILLA_VERSION/$CLONEZILLA_VERSION/ +s/SYSRESCCD_VERSION/$SYSRESCCD_VERSION/ +" download.html > download.html.$$ && mv download.html.$$ download.html + +popd +if [ -z "$noDoc" ];then + ./html2doc + ./html2txt +else + echo + echo " **** NOT HANDLING DOCS ****" +fi +