Skip to content

Commit d374ed6

Browse files
committed
Get kernel in install sources automatically
1 parent ed634bd commit d374ed6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

01_edit_iso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
mount -o loop "$(pwd)/$ISO_IMAGE" "$ISO_MOUNT_DIR"
1818

1919
if [ "$SUBIQUITY" = "yes" ]; then
20-
rsync -a "$ISO_MOUNT_DIR/" "$ISO_WORK_DIR" --include="casper/initrd" --include="casper/vmlinuz" --include="casper/minimal.standard.live.squashfs" --include="casper/minimal.standard.live.manifest" --include="casper/minimal.standard.live.size" --exclude="casper/*" --exclude="md5sum.txt" --exclude="MD5SUMS" --exclude=".disk/release_notes_url" --exclude="casper/*.gpg"
20+
rsync -a "$ISO_MOUNT_DIR/" "$ISO_WORK_DIR" --include="casper/initrd" --include="casper/vmlinuz" --include="casper/minimal.standard.live.squashfs" --include="casper/minimal.standard.live.manifest" --include="casper/minimal.standard.live.size" --include="casper/install-sources.yaml" --exclude="casper/*" --exclude="md5sum.txt" --exclude="MD5SUMS" --exclude=".disk/release_notes_url" --exclude="casper/*.gpg"
2121
unsquashfs -d "$CHROOT_DIR" "$ISO_MOUNT_DIR/casper/minimal.squashfs"
2222
unsquashfs -d "$CHROOT_DIR_EXTRA" "$ISO_MOUNT_DIR/casper/minimal.standard.squashfs"
2323
rsync -a "$CHROOT_DIR_EXTRA/" "$CHROOT_DIR/"

build.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ ROOT_PATH=$(pwd)/work
66
OUTPUT_PATH=$(pwd)/output
77

88
FLAVOUR=$1
9-
FLAVOUR_CAP=$(echo "${FLAVOUR}" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2); print}')
9+
if [ "$FLAVOUR" = "ubuntucinnamon" ]; then
10+
FLAVOUR_CAP="Ubuntu Cinnamon"
11+
elif [ "$FLAVOUR" = "ubuntu-mate" ]; then
12+
FLAVOUR_CAP="Ubuntu MATE"
13+
else
14+
FLAVOUR_CAP=$(echo "${FLAVOUR}" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2); print}')
15+
fi
1016
ISO_MOUNT_DIR="$ROOT_PATH/${FLAVOUR}-original" # Temporary mount point for the original ISO
1117
VER=25.10
1218
CODENAME=questing
@@ -18,10 +24,10 @@ ISO_WORK_DIR="$ROOT_PATH/${FLAVOUR}-iso"
1824
CHROOT_DIR="$ROOT_PATH/${FLAVOUR}-edit"
1925
CHROOT_DIR_EXTRA="$ROOT_PATH/${FLAVOUR}-edit-extra"
2026

21-
if [ "$FLAVOUR" = "ubuntu" ]; then
22-
SUBIQUITY=yes
23-
else
27+
if [ "$FLAVOUR" = "kubuntu" ] || [ "$FLAVOUR" = "ubuntu-unity" ]; then
2428
SUBIQUITY=no
29+
else
30+
SUBIQUITY=yes
2531
fi
2632

2733
echo "ROOT_PATH=$ROOT_PATH"
@@ -105,9 +111,10 @@ if [ "$SUBIQUITY" = "yes" ]; then
105111
ln -s minimal.manifest filesystem.manifest
106112
FILESYSTEM_SIZE=$(($(cat minimal.size)+$(cat minimal.standard.live.size)))
107113
echo ${FILESYSTEM_SIZE} > filesystem.size
114+
LINUXGENERIC=$(cat ./install-sources.yaml | grep default | grep generic | cut -d ":" -f 2 | xargs)
108115
cat <<EOF | tee ./install-sources.yaml
109116
kernel:
110-
default: linux-generic-hwe-24.04
117+
default: ${LINUXGENERIC}
111118
sources:
112119
- default: true
113120
description:

0 commit comments

Comments
 (0)