Fix falling back to old flash type detection (#579)

pull/580/head
Paul Philippov 2022-11-23 08:57:21 -05:00 committed by GitHub
parent 741151a4d2
commit 53a887a003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -3,7 +3,7 @@
# OpenIPC.org | v.20221118 # OpenIPC.org | v.20221118
# #
scr_version=1.0.14 scr_version=1.0.15
args=" $@" args=" $@"
@ -80,10 +80,8 @@ do_wipe_overlay() {
download_firmware() { download_firmware() {
echo_c 33 "\nFirmware" echo_c 33 "\nFirmware"
osr=$(get_system_build) osr=$(get_system_build)
ftype=$(ipcinfo -F) ftype=$(ipcinfo -F 2>/dev/null)
if $(echo ${ftype} | (! grep -qE 'nor|nand')); then [ ${#ftype} -gt 4 ] && ftype=$(get_flash_type)
ftype=$(get_flash_type)
fi
build="${soc}-${ftype}-${osr}" build="${soc}-${ftype}-${osr}"
[ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${build}.tgz" [ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${build}.tgz"
echo "Download from $url" echo "Download from $url"