Skip to content

Commit

Permalink
Fix iso.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaGarg8 committed May 9, 2024
1 parent b7d7098 commit 2ded208
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 45 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ jobs:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-swapfile: 'true'
remove-codeql: 'true'

- name: Build
run: sudo ./build.sh cinnamon
run: sudo ./build_in_docker.sh cinnamon

- name: print sha256sum
run: cat output/sha256*
Expand Down Expand Up @@ -76,9 +78,11 @@ jobs:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-swapfile: 'true'
remove-codeql: 'true'

- name: Build
run: sudo ./build.sh mate
run: sudo ./build_in_docker.sh mate

- name: print sha256sum
run: cat output/sha256*
Expand Down Expand Up @@ -131,9 +135,11 @@ jobs:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-swapfile: 'true'
remove-codeql: 'true'

- name: Build
run: sudo ./build.sh xfce
run: sudo ./build_in_docker.sh xfce

- name: print sha256sum
run: cat output/sha256*
Expand Down
61 changes: 20 additions & 41 deletions .github/workflows/iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,74 +27,53 @@ set -e

cd $HOME/Downloads

latest=$(curl -sL https://github.com/t2linux/T2-Ubuntu/releases/latest/ | grep "<title>Release" | awk -F " " '{print $2}' )
latest=$(curl -sL https://github.com/t2linux/T2-Mint/releases/latest/ | grep "<title>Release" | awk -F " " '{print $2}' )
latestkver=$(echo $latest | cut -d "v" -f 2 | cut -d "-" -f 1)

cat <<EOF
Choose the flavour of Ubuntu you wish to install:
Choose the flavour of Linux Mint you wish to install:
1. Ubuntu
2. Kubuntu
1. Cinnamon
2. Xfce
3. MATE
Type your choice (1 or 2) from the above list and press return.
Type your choice (1,2 or 3) from the above list and press return.
EOF

read flavinput

case "$flavinput" in
(1)
flavour=ubuntu
flavour=cinnamon
flavourcap=Cinnamon
;;
(2)
flavour=kubuntu
flavour=xfce
flavourcap=Xfce
;;
(*)
echo "Invalid input. Aborting!"
exit 1
;;
esac

cat <<EOF
Choose the version of Ubuntu you wish to install:
1. 22.04 LTS - Jammy Jellyfish
2. 24.04 LTS - Noble Numbat
Type your choice (1 or 2) from the above list and press return.
EOF

read verinput

case "$verinput" in
(1)
iso="${flavour}-22.04-${latestkver}-t2-jammy"
ver="22.04 LTS - Jammy Jellyfish"
;;
(2)
iso="${flavour}-24.04-${latestkver}-t2-noble"
ver="24.04 LTS - Noble Numbat"
(3)
flavour=mate
flavourcap=MATE
;;
(*)
echo "Invalid input. Aborting!"
exit 1
;;
esac

firstChar=$(echo "$flavour" | cut -c1 | tr '[a-z]' '[A-Z]')
restOfString=$(echo "$flavour" | cut -c2-)
flavourcap="${firstChar}${restOfString}"
iso="linuxmint-21.3-${flavour}-${latestkver}-t2-jammy"
ver="Linux Mint 21.3 \"Virginia\" - ${flavourcap} Edition"

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

Expand All @@ -105,7 +84,7 @@ mv $HOME/Downloads/repo/${iso}.iso $HOME/Downloads

echo -e "\nVerifying sha256 checksums"

actual_iso_chksum=$(curl -sL https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/sha256-${flavour}-$(echo ${ver} | cut -d " " -f 1) | cut -d " " -f 1)
actual_iso_chksum=$(curl -sL https://github.com/t2linux/T2-Mint/releases/download/${latest}/sha256-${flavour}
case "$os" in
(Darwin)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ do
zip -s 2000m "${ROOT_PATH}/output/linuxmint-${MINT_VERSION}-${FLAVOUR}-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/linuxmint-${MINT_VERSION}-${FLAVOUR}-${KERNEL_VERSION}-${ALTERNATIVE}.iso"
done
## Calculate sha256 sums of built ISO
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256-linuxmint-${MINT_VERSION}-${FLAVOUR}"
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256-${FLAVOUR}"

find ./ | grep ".iso"
find ./ | grep ".zip"
Expand Down

0 comments on commit 2ded208

Please sign in to comment.