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