86f52450a1
These changes allow you to create two independent config at the same time or separately. It will be possible to add support for grub-pc in the future.
21 lines
583 B
Bash
Executable File
21 lines
583 B
Bash
Executable File
#!/bin/sh
|
|
# postprocess isolinux configuration
|
|
# when the image sizes are finally known
|
|
# NB: install2_size, live_size, rescue_size get defined here
|
|
|
|
cd "$WORKDIR"
|
|
|
|
[ -f boot/grub/grub.cfg -o -f EFI/BOOT/grub.cfg ] || exit 0
|
|
|
|
cfgs=
|
|
[ ! -f boot/grub/grub.cfg ] || cfgs+='boot/grub/grub.cfg '
|
|
[ ! -f EFI/BOOT/grub.cfg ] || cfgs+='EFI/BOOT/grub.cfg'
|
|
|
|
# apply size census while looking for potential squashfs images
|
|
find -maxdepth 1 -type f -size +1M \
|
|
| sed 's,^\./,,' \
|
|
| while read image; do
|
|
size="$[ $(stat -c%s "$image") / 1024 + 1 ]"
|
|
sed -i "s,@${image}_size@,$size," $cfgs
|
|
done
|