mirror of https://github.com/OpenIPC/firmware.git
fix sysupgrade script to check build option
parent
2126a1753a
commit
a7b2c71d97
|
@ -70,7 +70,13 @@ do_wipe_overlay() {
|
|||
|
||||
download_firmware() {
|
||||
echo_c 33 "\nFirmware"
|
||||
[ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${soc}-br.tgz"
|
||||
osr=$(get_system_build)
|
||||
if [[ "${osr}" == "lite" ]] || [[ "${osr}" == "" ]]; then
|
||||
build="-"
|
||||
else
|
||||
build="-${osr}-"
|
||||
fi
|
||||
[ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${soc}${build}br.tgz"
|
||||
echo "Download from $url"
|
||||
[ -z "$HASERLVER" ] && progress="-#" || progress="-s"
|
||||
[ "$(curl -o /dev/null -s -w '%{http_code}\n' "$url")" = "000" ] && die "Check your network!"
|
||||
|
@ -120,6 +126,10 @@ get_system_version() {
|
|||
grep "GITHUB_VERSION" "$1/etc/os-release" | head -1 | cut -d= -f2 | sed 's/"//g'
|
||||
}
|
||||
|
||||
get_system_build() {
|
||||
grep "BUILD_OPTION" "/etc/os-release" | head -1 | cut -d= -f2
|
||||
}
|
||||
|
||||
print_sysinfo() {
|
||||
get_system_info
|
||||
echo_c 33 "OpenIPC System Updater"
|
||||
|
|
Loading…
Reference in New Issue