buildscript: Keep target name for x86

The x86 OpenWrt target does not have device names, as x86 images are
generic for various hardware. Therefore, removing the target and
subtarget from the image name results in an indistiguishable image name.

Keep the target name for x86 images, so the resulting images are
distinguishable.

Fixes: #229

Signed-off-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Fabian Bläse 2022-03-29 19:32:39 +02:00
parent 0f67aa2504
commit 880d56d52c
1 changed files with 7 additions and 2 deletions

View File

@ -280,8 +280,13 @@ cp_firmware() {
filename_build=${f##*/}
filename_build=${filename_build//openwrt/fff-${version}}
filename_build=${filename_build//squashfs-/}
filename_build=${filename_build//${chipset}-/}
filename_build=${filename_build//${subtarget}-/}
# The x86 OpenWrt target does not have a device name,
# so keep the target and subtarget for identification.
if [ "$chipset" != "x86" ]; then
filename_build=${filename_build//${chipset}-/}
filename_build=${filename_build//${subtarget}-/}
fi
cp "$f" "$imagedestpath/$filename_build"
done
done