build/release/roms: minor cleanup

split actual purging of blobs to a function

rename functions for clarity
fsdg20230625
Leah Rowe 2023-05-20 19:45:08 +01:00
parent ec3d1006b3
commit 92bd18c45a
1 changed files with 36 additions and 29 deletions

View File

@ -90,7 +90,7 @@ make_archive()
# remove ME/MRC/EC firmware from ROM images # remove ME/MRC/EC firmware from ROM images
if [ "${CONFIG_HAVE_ME_BIN}" = "y" ] \ if [ "${CONFIG_HAVE_ME_BIN}" = "y" ] \
|| [ "${target}" = "e6400nvidia_4mb" ]; then || [ "${target}" = "e6400nvidia_4mb" ]; then
purge_blobs "${romdir}" strip_archive "${romdir}"
fi fi
printf "Generating release/%s/roms/%s-%s_%s.tar.xz\n" \ printf "Generating release/%s/roms/%s-%s_%s.tar.xz\n" \
@ -110,7 +110,7 @@ make_archive()
fi fi
} }
purge_blobs() strip_archive()
{ {
romdir=${1} romdir=${1}
@ -137,6 +137,14 @@ purge_blobs()
for romfile in "${romdir}"/*.rom for romfile in "${romdir}"/*.rom
do do
strip_rom_image "${romfile}"
done
}
strip_rom_image()
{
romfile=${1}
if [ ! -f "${romfile}" ]; then if [ ! -f "${romfile}" ]; then
continue continue
fi fi
@ -164,7 +172,6 @@ purge_blobs()
-n "pci10de,06eb.rom" \ -n "pci10de,06eb.rom" \
|| exit 1 || exit 1
fi fi
done
} }
err() err()