Skip to content

Commit

Permalink
Update iso.sh
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jiya-Ull-Haq authored and AdityaGarg8 committed Sep 17, 2023
1 parent e5766ac commit 3357382
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3357382

Please sign in to comment.