mirror of
https://github.com/t2linux/T2-Ubuntu.git
synced 2026-08-16 05:18:03 -07:00
split isos in 4 parts
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user