buildscript: Split removal of chipset and subtarget

Some OpenWrt targets do not have subtargets. The filename only contains
the chipset in that case. Split the removal of chipset and subtarget
into multiple expressions, so the removal of the chipset works on
targets without subtargets as well.

Fixes: #187

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Fabian Bläse 2021-12-27 14:32:36 +01:00
parent a3d62c7fcc
commit 7c3f3230ff
1 changed files with 2 additions and 1 deletions

View File

@ -290,7 +290,8 @@ cp_firmware() {
filename_build=${f##*/}
filename_build=${filename_build//openwrt/fff-${version}}
filename_build=${filename_build//squashfs-/}
filename_build=${filename_build//${chipset}-${subtarget}-/}
filename_build=${filename_build//${chipset}-/}
filename_build=${filename_build//${subtarget}-/}
cp "$f" "$imagedestpath/$filename_build"
done
done