mirror of https://github.com/OpenIPC/firmware.git
Merge pull request #225 from cronyx/master
fix sysupgrade script to check build optionpull/226/head
commit
a448d05f44
general/overlay/usr/sbin
|
@ -70,7 +70,13 @@ do_wipe_overlay() {
|
||||||
|
|
||||||
download_firmware() {
|
download_firmware() {
|
||||||
echo_c 33 "\nFirmware"
|
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"
|
echo "Download from $url"
|
||||||
[ -z "$HASERLVER" ] && progress="-#" || progress="-s"
|
[ -z "$HASERLVER" ] && progress="-#" || progress="-s"
|
||||||
[ "$(curl -o /dev/null -s -w '%{http_code}\n' "$url")" = "000" ] && die "Check your network!"
|
[ "$(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'
|
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() {
|
print_sysinfo() {
|
||||||
get_system_info
|
get_system_info
|
||||||
echo_c 33 "OpenIPC System Updater"
|
echo_c 33 "OpenIPC System Updater"
|
||||||
|
|
Loading…
Reference in New Issue