split isos in 4 parts

This commit is contained in:
Aditya Garg
2026-04-24 10:09:18 +05:30
parent a2cc78b100
commit 52502895a1
2 changed files with 13 additions and 5 deletions
+4 -2
View File
@@ -79,6 +79,7 @@ jobs:
new_link1 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu-24.04-${{ env.kver }}-t2-noble.iso.00"
new_link2 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu-24.04-${{ env.kver }}-t2-noble.iso.01"
new_link3 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu-24.04-${{ env.kver }}-t2-noble.iso.02"
new_link4 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu-24.04-${{ env.kver }}-t2-noble.iso.03"
# Load the JSON file
with open('distro-metadata.json', 'r') as file:
data = json.load(file)
@@ -89,7 +90,7 @@ jobs:
distro['iso'] = new_links
distro['sha256'] = sha256
# Update the links
update_links(data['all'], "Kubuntu 24.04 - Noble Numbat", [new_link1, new_link2, new_link3], "${{ env.sha256 }}")
update_links(data['all'], "Kubuntu 24.04 - Noble Numbat", [new_link1, new_link2, new_link3, new_link4], "${{ env.sha256 }}")
# Save the updated JSON back to the file
with open('distro-metadata.json', 'w') as file:
json.dump(data, file, indent=2)
@@ -188,6 +189,7 @@ jobs:
new_link1 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-24.04-${{ env.kver }}-t2-noble.iso.00"
new_link2 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-24.04-${{ env.kver }}-t2-noble.iso.01"
new_link3 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-24.04-${{ env.kver }}-t2-noble.iso.02"
new_link4 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-24.04-${{ env.kver }}-t2-noble.iso.03"
# Load the JSON file
with open('distro-metadata.json', 'r') as file:
data = json.load(file)
@@ -198,7 +200,7 @@ jobs:
distro['iso'] = new_links
distro['sha256'] = sha256
# Update the links
update_links(data['all'], "Ubuntu Unity 24.04 - Noble Numbat", [new_link1, new_link2, new_link3], "${{ env.sha256 }}" )
update_links(data['all'], "Ubuntu Unity 24.04 - Noble Numbat", [new_link1, new_link2, new_link3, new_link4], "${{ env.sha256 }}" )
# Save the updated JSON back to the file
with open('distro-metadata.json', 'w') as file:
json.dump(data, file, indent=2)
+9 -3
View File
@@ -97,10 +97,16 @@ echo >&2 "===]> Info: Creating iso ... "
# split iso
ISO_SIZE=$(du -m "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" | cut -f1)
if [ "$ISO_SIZE" -lt 4000 ]; then
SPLIT_SIZE=1500M
else
if [ "$ISO_SIZE" -gt 6000 ]; then
SPLIT_SIZE=2000M
elif [ "$ISO_SIZE" -gt 4500 ]; then
SPLIT_SIZE=1500M
elif [ "$ISO_SIZE" -gt 3000 ]; then
SPLIT_SIZE=1000M
elif [ "$ISO_SIZE" -gt 2000 ]; then
SPLIT_SIZE=600M
else
SPLIT_SIZE=500M
fi
split -b ${SPLIT_SIZE} -x "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso."
sha256sum "${OUTPUT_PATH}"/*.iso > "${OUTPUT_PATH}/sha256-${FLAVOUR}-${VER}"