--- trunk/www/working/scripts/2site 2010/05/18 14:22:00 42 +++ trunk/www/working/scripts/2site 2010/05/19 15:03:43 45 @@ -19,27 +19,33 @@ # along with Clonezilla-SysRescCD. If not, see . # #################################################################################### -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'` +#################################################################################### +# 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 -# . "$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 -} +#################################################################################### + +#################################################################################### +# Script starts here # +#################################################################################### + +# Go to www/ directory +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'` md5sum="$(echo "$whereIsTheISO" | sed 's|/[^/]*$|/md5sum.txt|')" md5sum="$(cat "$md5sum")" @@ -82,7 +88,7 @@ sed "/]*>What's New<.H1>/a \ $l -" .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 echo 'done' @@ -95,7 +101,7 @@ echo -n ' news.php... ' sed -n '1,/
/p' template.html > 1.$$ -cat .news.php >> 1.$$ +cat working/.news.php >> 1.$$ sed '1,/
/d' template.html | sed '/