@@ -2031,18 +2031,18 @@ Press any key to continue...'
20312031 G_DEV_TEST_FIRMWARE ()
20322032 {
20332033 G_CHECK_ROOT_USER " $@ " || return 0
2034- local branch=$1 packages =()
2034+ local branch=$1 apackages =()
20352035 [[ $branch ]] || branch=$( uname -r) branch=${branch% -* } branch=${branch##* -}
2036- mapfile -t packages < <( dpkg-query -l | mawk -v " branch=$branch " ' $1=="ii" && match($2,"^(linux-(image|dtb|headers|libc-dev)-"branch"-|linux-u-boot-.*-"branch"$|armbian-firmware$|firmware-(quartz64[ab]|soquartz)$|linux-image-(star64|visionfive2)$)") {print "https://dietpi.com/downloads/binaries/testing/"$2".deb"}' )
2037- [[ ${packages [0]} ]] || { G_DIETPI-NOTIFY 1 ' No matching packages are installed on your system, aborting ...' ; return 1; }
2036+ mapfile -t apackages < <( dpkg-query -l | mawk -v " branch=$branch " ' $1=="ii" && match($2,"^(linux-(image|dtb|headers|libc-dev)-"branch"-|linux-u-boot-.*-"branch"$|armbian-firmware$|firmware-(quartz64[ab]|soquartz)$|linux-image-(star64|visionfive2)$)") {print "https://dietpi.com/downloads/binaries/testing/"$2".deb"}' )
2037+ [[ ${apackages [0]} ]] || { G_DIETPI-NOTIFY 1 ' No matching packages are installed on your system, aborting ...' ; return 1; }
20382038 # Orange Pi 5 Max/Ultra: Install kernel build with bcmdhd WiFi module configured for SDIO rather than USB
2039- (( $G_HW_MODEL == 91 || $G_HW_MODEL == 94 )) && packages =(" ${packages [@]/ vendor-rk35xx/ vendor-rk35xx_bcmdhd-sdio} " )
2039+ (( $G_HW_MODEL == 91 || $G_HW_MODEL == 94 )) && apackages =(" ${apackages [@]/ vendor-rk35xx/ vendor-rk35xx_bcmdhd-sdio} " )
20402040 G_EXEC cd /tmp
2041- G_EXEC_DESC=" Downloading packages: ${packages [*]##*/ } " G_EXEC rm -f " ${packages [@]##*/ } "
2042- wget " ${packages [@]} "
2043- for i in " ${! packages [@]} " ; do [[ -f ${packages [i]##*/ } ]] || unset -v ' packages [i]' ; done
2044- (( ${# packages [@]} )) || { G_DIETPI-NOTIFY 1 ' None of the packages could be downloaded, aborting ...' ; return 1; }
2045- G_EXEC_OUTPUT=1 G_EXEC dpkg -i " ${packages [@]##*/ } "
2041+ G_EXEC_DESC=" Downloading packages: ${apackages [*]##*/ } " G_EXEC rm -f " ${apackages [@]##*/ } "
2042+ wget " ${apackages [@]} "
2043+ for i in " ${! apackages [@]} " ; do [[ -f ${apackages [i]##*/ } ]] || unset -v ' apackages [i]' ; done
2044+ (( ${# apackages [@]} )) || { G_DIETPI-NOTIFY 1 ' None of the packages could be downloaded, aborting ...' ; return 1; }
2045+ G_EXEC_OUTPUT=1 G_EXEC dpkg -i " ${apackages [@]##*/ } "
20462046 }
20472047
20482048 # Inject setting into config file: First tries to replace old setting, else commented setting and otherwise adds to end of file.
0 commit comments