Update iso.sh

Issue:
I downloaded the 2 parts manually and then ran iso.sh.
iso.sh downloads the 2 parts again then create iso file.

Fix:
I'm adding a condition 
if the part exists already then it will skip downloading and then creates iso file,
else it will download the part that doesn't exist and then creates iso file.
This commit is contained in:
Jiya 2023-09-17 22:55:46 +05:30 committed by GitHub
parent e5766ac4a0
commit 7eb8daaff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -84,11 +84,16 @@ esac
flavourcap=`echo ${flavour:0:1} | tr '[a-z]' '[A-Z]'`${flavour:1}
echo -e "\nDownloading ${flavourcap} ${ver}"
echo -e "\nPart 1"
curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.z01 > ${iso}.z01
echo -e "\nPart 2"
curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.zip > ${iso}.zip
if [ ! -f ${iso}.z01 ]; then
echo -e "\nDownloading Part 1 for ${flavourcap} ${ver}"
echo -e "\n"
curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.z01 > ${iso}.z01
fi
if [ ! -f ${iso}.zip ]; then
echo -e "\nDownloading Part 2 for ${flavourcap} ${ver}"
echo -e "\n"
curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.zip > ${iso}.zip
fi
echo -e "\nCreating ISO"
isofinal=$RANDOM