27 lines
546 B
Bash
27 lines
546 B
Bash
#!/usr/bin/bash
|
|
#
|
|
# build live images and copy kernel, initramfs and squashfs
|
|
#
|
|
|
|
set -eu
|
|
|
|
BUILDD="{{ build_dir }}"
|
|
|
|
run_build(){
|
|
local DEST="/var/lib/tftpboot/d-i/n-live/$1/live/"
|
|
cd "$BUILDD/$1"
|
|
[[ -d "$DEST" ]] || mkdir -vp "$DEST"
|
|
|
|
lb clean && lb config && lb build
|
|
|
|
for FILE in vmlinuz initrd.img filesystem.squashfs ; do
|
|
ln -vf "$BUILDD/$1/binary/live/$FILE" "$DEST"
|
|
done
|
|
}
|
|
|
|
## main:
|
|
|
|
for IMG in {{ build_images|join(' ') }} ; do
|
|
echo "=========== Building image $IMG ==========="
|
|
run_build $IMG
|
|
done
|