--- trunk/create-clonezilla-sysresccd/create-clonezilla-sysresccd.sh 2011/06/03 17:27:54 178 +++ trunk/create-clonezilla-sysresccd/create-clonezilla-sysresccd.sh 2012/08/21 13:20:56 187 @@ -61,11 +61,17 @@ if [ "$1" = "all" ] || [ -z "$1" ];then # Download all files for clonType in i686 i486 amd64;do + if [ "$clonType" = "i686" ];then + clonType="$clonType"-pae + fi clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" downloadClonezillaLive done else clonType="$1" + if [ "$clonType" = "i686" ];then + clonType="$clonType"-pae + fi clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" downloadClonezillaLive fi @@ -77,16 +83,18 @@ if [ -e systemrescuecd-x86-"$sysVersion".iso ];then if [ -n "$md5sumFound" ];then echo "$sysmd5 systemrescuecd-x86-"$sysVersion".iso" > test.md5sum - echo -n "File found. Checking integrity of " + echo -n "File found. + Checking integrity of " md5sum -c test.md5sum 2>/dev/null if [ "$?" -eq 0 ];then rm -f test.md5sum 2>/dev/null return else echo "File systemrescuecd-x86-"$sysVersion".iso already exists" - echo "You can continue downloading the file or restart it" - echo -n "Continue downloading? (y/[n]): " + echo " You can continue downloading the file or restart it" + echo -n " Continue downloading? (y/[n]): " read ans + curlContinue="" if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then curlContinue=1 else @@ -95,11 +103,12 @@ fi else echo "File systemrescuecd-x86-"$sysVersion".iso already exists" - echo "You can continue downloading the file or restart it" - echo "If you do continue downloading, and since md5sum was not found," - echo "make sure you check the file's integrity manually, after the" - echo "download is complete" - echo -n "Continue downloading? (y/[n]): " + echo " You can continue downloading the file or restart it" + echo " If you do continue downloading, and since md5sum was not found," + echo " make sure you check the file's integrity manually, after the" + echo " download is complete" + echo -n " Continue downloading? (y/[n]): " + curlContinue="" read ans if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then curlContinue=1 @@ -143,15 +152,16 @@ echo "$i686md5 clonezilla-live-"$clonVersion"-"$clonType".iso">test.md5sum fi unset checkmd5 - echo -n "File found. Checking integrity of " + echo -n "File found. + Checking integrity of " md5sum -c test.md5sum 2>/dev/null && checkmd5=1 if [ -z "$checkmd5" ];then # md5 check failed unset checkmd5 echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" - echo "You can continue downloading the file or restart it" - echo -n "Continue downloading? (y/[n]): " + echo " You can continue downloading the file or restart it" + echo -n " Continue downloading? (y/[n]): " read ans if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then curlContinue=1 @@ -166,11 +176,11 @@ else # no md5sum echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" - echo "You can continue downloading the file or restart it" - echo "If you do continue downloading, and since md5sum was not found," - echo "make sure you check the file's integrity manually, after the" - echo "download is complete" - echo -n "Continue downloading? (y/[n]): " + echo " You can continue downloading the file or restart it" + echo " If you do continue downloading, and since md5sum was not found," + echo " make sure you check the file's integrity manually, after the" + echo " download is complete" + echo -n " Continue downloading? (y/[n]): " read ans if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then curlContinue=1