From f9f080bd6e2beccafa3aa15ea95e678d6d055f5a Mon Sep 17 00:00:00 2001 From: Jiya <60106386+Jiya-Ull-Haq@users.noreply.github.com> Date: Sun, 17 Sep 2023 22:55:46 +0530 Subject: [PATCH] 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. --- .github/workflows/iso.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/iso.sh b/.github/workflows/iso.sh index 67ba200..ca7a197 100644 --- a/.github/workflows/iso.sh +++ b/.github/workflows/iso.sh @@ -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