mkimage-profiles/features.in/syslinux/scripts.d/20-propagator-ramdisk
Michael Shigorin 8419175c02 syslinux: help git grep *_size
It's not exactly obvious how install2_size, live_size or rescue_size
get defined since the variable names themselves get constructed;
help git grep these down.
2014-03-31 23:45:43 +04:00

15 lines
409 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"
# 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," syslinux/*.cfg
done