@@ -116,7 +116,7 @@ def download(url, file_name=None):
116116 fname = f .get ("name" )
117117
118118 if not fname in bfiles :
119- if re .search (r"^(hostapd|iproute2).*\.tar.gz$" ,fname ):
119+ if re .search (r"^(hostapd|iproute2|iperf|wpa_supplicant ).*\.tar.gz$" ,fname ):
120120 #fn=re.sub(boardpattern,r'\1',kfname)
121121 bfiles [fname ]= f .get ("browser_download_url" )
122122
@@ -171,20 +171,20 @@ def download(url, file_name=None):
171171if config and config .get ("userpackages" ):
172172 newconfig ["userpackages" ]= config .get ("userpackages" )
173173
174- if config and config . get ( "replacehostapd" ) :
175- newconfig [ "replacehostapd" ] = config .get ("replacehostapd" )
176-
177- if bfiles :
178- hostapdfile = bfiles . get ( "hostapd_arm64.tar.gz" )
179- a = urlparse ( hostapdfile )
180- fname = os . path . basename ( a . path )
181- print ( f"hostapdfile: { hostapdfile } filename: { fname } " )
182- if not os . path . isfile ( fname ):
183- download ( hostapdfile , fname )
184- else : print ( fname , "already exists" )
185- newconfig [ "hostapdfile" ] = fname
186- else : print ( "no bfiles defined!" )
187-
174+ for replacement in [ "hostapd" , "wpa_supplicant" , "iperf" , "iproute2" ] :
175+ if config and config .get ("replace" + replacement ):
176+ newconfig [ "replace" + replacement ] = config . get ( "replace" + replacement )
177+
178+ if bfiles :
179+ replacefile = bfiles . get ( replacement + "_arm64.tar.gz" )
180+ a = urlparse ( replacefile )
181+ fname = os . path . basename ( a . path )
182+ print ( f" { replacement } file: { replacefile } filename: { fname } " )
183+ if not os . path . isfile ( fname ):
184+ download ( replacefile , fname )
185+ else : print ( fname , "already exists" )
186+ newconfig [ replacement + "file" ] = fname
187+ else : print ( "no bfiles defined!" )
188188
189189
190190with open (conffile , 'w' ) as f :
0 commit comments