61 |
if [ "$1" = "all" ] || [ -z "$1" ];then |
if [ "$1" = "all" ] || [ -z "$1" ];then |
62 |
# Download all files |
# Download all files |
63 |
for clonType in i686 i486 amd64;do |
for clonType in i686 i486 amd64;do |
64 |
|
if [ "$clonType" = "i686" ];then |
65 |
|
clonType="$clonType"-pae |
66 |
|
fi |
67 |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
68 |
downloadClonezillaLive |
downloadClonezillaLive |
69 |
done |
done |
70 |
else |
else |
71 |
clonType="$1" |
clonType="$1" |
72 |
|
if [ "$clonType" = "i686" ];then |
73 |
|
clonType="$clonType"-pae |
74 |
|
fi |
75 |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
76 |
downloadClonezillaLive |
downloadClonezillaLive |
77 |
fi |
fi |
83 |
if [ -e systemrescuecd-x86-"$sysVersion".iso ];then |
if [ -e systemrescuecd-x86-"$sysVersion".iso ];then |
84 |
if [ -n "$md5sumFound" ];then |
if [ -n "$md5sumFound" ];then |
85 |
echo "$sysmd5 systemrescuecd-x86-"$sysVersion".iso" > test.md5sum |
echo "$sysmd5 systemrescuecd-x86-"$sysVersion".iso" > test.md5sum |
86 |
echo -n "File found. Checking integrity of " |
echo -n "File found. |
87 |
|
Checking integrity of " |
88 |
md5sum -c test.md5sum 2>/dev/null |
md5sum -c test.md5sum 2>/dev/null |
89 |
if [ "$?" -eq 0 ];then |
if [ "$?" -eq 0 ];then |
90 |
rm -f test.md5sum 2>/dev/null |
rm -f test.md5sum 2>/dev/null |
91 |
return |
return |
92 |
else |
else |
93 |
echo "File systemrescuecd-x86-"$sysVersion".iso already exists" |
echo "File systemrescuecd-x86-"$sysVersion".iso already exists" |
94 |
echo "You can continue downloading the file or restart it" |
echo " You can continue downloading the file or restart it" |
95 |
echo -n "Continue downloading? (y/[n]): " |
echo -n " Continue downloading? (y/[n]): " |
96 |
read ans |
read ans |
97 |
|
curlContinue="" |
98 |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
99 |
curlContinue=1 |
curlContinue=1 |
100 |
else |
else |
103 |
fi |
fi |
104 |
else |
else |
105 |
echo "File systemrescuecd-x86-"$sysVersion".iso already exists" |
echo "File systemrescuecd-x86-"$sysVersion".iso already exists" |
106 |
echo "You can continue downloading the file or restart it" |
echo " You can continue downloading the file or restart it" |
107 |
echo "If you do continue downloading, and since md5sum was not found," |
echo " If you do continue downloading, and since md5sum was not found," |
108 |
echo "make sure you check the file's integrity manually, after the" |
echo " make sure you check the file's integrity manually, after the" |
109 |
echo "download is complete" |
echo " download is complete" |
110 |
echo -n "Continue downloading? (y/[n]): " |
echo -n " Continue downloading? (y/[n]): " |
111 |
|
curlContinue="" |
112 |
read ans |
read ans |
113 |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
114 |
curlContinue=1 |
curlContinue=1 |
152 |
echo "$i686md5 clonezilla-live-"$clonVersion"-"$clonType".iso">test.md5sum |
echo "$i686md5 clonezilla-live-"$clonVersion"-"$clonType".iso">test.md5sum |
153 |
fi |
fi |
154 |
unset checkmd5 |
unset checkmd5 |
155 |
echo -n "File found. Checking integrity of " |
echo -n "File found. |
156 |
|
Checking integrity of " |
157 |
md5sum -c test.md5sum 2>/dev/null && checkmd5=1 |
md5sum -c test.md5sum 2>/dev/null && checkmd5=1 |
158 |
|
|
159 |
if [ -z "$checkmd5" ];then |
if [ -z "$checkmd5" ];then |
160 |
# md5 check failed |
# md5 check failed |
161 |
unset checkmd5 |
unset checkmd5 |
162 |
echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" |
echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" |
163 |
echo "You can continue downloading the file or restart it" |
echo " You can continue downloading the file or restart it" |
164 |
echo -n "Continue downloading? (y/[n]): " |
echo -n " Continue downloading? (y/[n]): " |
165 |
read ans |
read ans |
166 |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
167 |
curlContinue=1 |
curlContinue=1 |
176 |
else |
else |
177 |
# no md5sum |
# no md5sum |
178 |
echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" |
echo "File clonezilla-live-"$clonVersion"-"$clonType".iso already exists" |
179 |
echo "You can continue downloading the file or restart it" |
echo " You can continue downloading the file or restart it" |
180 |
echo "If you do continue downloading, and since md5sum was not found," |
echo " If you do continue downloading, and since md5sum was not found," |
181 |
echo "make sure you check the file's integrity manually, after the" |
echo " make sure you check the file's integrity manually, after the" |
182 |
echo "download is complete" |
echo " download is complete" |
183 |
echo -n "Continue downloading? (y/[n]): " |
echo -n " Continue downloading? (y/[n]): " |
184 |
read ans |
read ans |
185 |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
if [ "$ans" = "y" ] || [ "$ans" = "Y" ];then |
186 |
curlContinue=1 |
curlContinue=1 |