1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 11:37:40 +00:00

Delete downloaded firmware image after installation.

This commit is contained in:
Jan Schneider
2018-02-27 20:57:18 +01:00
parent 6c75f65b3d
commit dd26628ea0
3 changed files with 25 additions and 4 deletions

View File

@@ -70,6 +70,7 @@ proc process {} {
regexp {\"language\"\s*:\s*\"([^\"]+)\"} $data match lang
regexp {\"reboot\"\s*:\s*(true|false)} $data match reboot
regexp {\"dryrun\"\s*:\s*(true|false)} $data match dryrun
regexp {\"keep_download\"\s*:\s*(true|false)} $data match keep_download
if { [info exists version] && $version != "" } {
if { ![info exists reboot] } {
set reboot "true"
@@ -79,7 +80,7 @@ proc process {} {
} else {
set reboot 0
}
if { ![info exists reboot] } {
if { ![info exists dryrun] } {
set dryrun "false"
}
if {$dryrun == "true"} {
@@ -87,7 +88,15 @@ proc process {} {
} else {
set dryrun 0
}
return "\"[rmupdate::install_firmware_version $version $lang $reboot $dryrun]\""
if { ![info exists keep_download] } {
set keep_download "false"
}
if {$keep_download == "true"} {
set keep_download 1
} else {
set keep_download 0
}
return "\"[rmupdate::install_firmware_version $version $lang $reboot $keep_download $dryrun]\""
} else {
error "Invalid version: ${data}"
}