From patchwork Sat Nov 23 15:11:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: buildscript: seperate removal of target/subtarget From: Fabian Blaese X-Patchwork-Id: 1227 Message-Id: <20191123151140.1116717-1-fabian@blaese.de> To: franken-dev@freifunk.net Date: Sat, 23 Nov 2019 16:11:40 +0100 In OpenWRT 18.06 there are targets, that don't have their subtarget in the filename as they only have one subtarget. If target and subtarget are removed in one regex, this regex doesn't match the target in these filenames. By splitting the removal into two regex, the removal works for both filename with only target and filenames with target/subtarget. Signed-off-by: Fabian Bläse Reviewed-by: Adrian Schmutzler --- Has to be applied before merging ipq806x devices (Archer C2600) --- buildscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildscript b/buildscript index 4c54aec..4a49ca7 100755 --- a/buildscript +++ b/buildscript @@ -297,7 +297,8 @@ cp_firmware() { for image in ${images[@]}; do filename_build=${image//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 "$builddir/bin/targets/${chipset}/${subtarget}/$image" "./bin/$filename_build" for region in "" "-eu" "-us"; do