[PATCH] buildscript: seperate removal of target/subtarget

Fabian Bläse fabian at blaese.de
Sa Nov 23 16:11:40 CET 2019


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 <fabian at blaese.de>
---
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
-- 
2.24.0



Mehr Informationen über die Mailingliste franken-dev