Skip to content

Commit

Permalink
Update iso.sh to support new naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaGarg8 authored Jun 20, 2024
1 parent 29bbb6f commit d16ca7e
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ case "$flavinput" in
;;
(3)
flavour=mate
flavourcap=MATE
flavourcap=MATE
;;
(*)
echo "Invalid input. Aborting!"
Expand All @@ -65,22 +65,19 @@ esac
iso="linuxmint-21.3-${flavour}-${latestkver}-t2-jammy"
ver="Linux Mint 21.3 \"Virginia\" - ${flavourcap} Edition"

if [ ! -f ${iso}.z01 ]; then
if [ ! -f ${iso}.iso.00 ]; then
echo -e "\nDownloading Part 1 for ${ver}"
echo -e "\n"
curl -#L https://github.com/t2linux/T2-Mint/releases/download/${latest}/${iso}.z01 > ${iso}.z01
curl -#L https://github.com/t2linux/T2-Mint/releases/download/${latest}/${iso}.iso.00 > ${iso}.iso.00
fi
if [ ! -f ${iso}.zip ]; then
if [ ! -f ${iso}.iso.01 ]; then
echo -e "\nDownloading Part 2 for ${ver}"
echo -e "\n"
curl -#L https://github.com/t2linux/T2-Mint/releases/download/${latest}/${iso}.zip > ${iso}.zip
curl -#L https://github.com/t2linux/T2-Mint/releases/download/${latest}/${iso}.iso.01 > ${iso}.iso.01
fi
echo -e "\nCreating ISO"

isofinal=$RANDOM
zip -F ${iso}.zip --out ${isofinal}.zip > /dev/null
unzip ${isofinal}.zip > /dev/null
mv $HOME/Downloads/home/runner/work/T2-Mint/T2-Mint/${iso}.iso $HOME/Downloads
cat ${iso}.iso.* > ${iso}.iso

echo -e "\nVerifying sha256 checksums"

Expand All @@ -105,9 +102,8 @@ echo -e "\nError: Failed to verify sha256 checksums of the ISO"
rm $HOME/Downloads/${iso}.iso
fi

rm -r $HOME/Downloads/home
rm $HOME/Downloads/${isofinal}.zip
rm $HOME/Downloads/${iso}.z??
rm $HOME/Downloads/${iso}.iso.00
rm $HOME/Downloads/${iso}.iso.01

if [[ ${actual_iso_chksum} != ${downloaded_iso_chksum} ]]
then
Expand Down

0 comments on commit d16ca7e

Please sign in to comment.