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

Implement addon update

This commit is contained in:
Jan Schneider
2018-01-21 01:47:07 +01:00
parent da1c9df9e4
commit fb7122669d
3 changed files with 174 additions and 87 deletions

View File

@@ -64,6 +64,13 @@ proc process {} {
} else {
error "Invalid version: ${data}"
}
} elseif {[lindex $path 1] == "install_addon"} {
regexp {\"addon_id\"\s*:\s*\"([^\"]+)\"} $data match addon_id
if { [info exists addon_id] && $addon_id != "" } {
return "\"[rmupdate::install_addon $addon_id]\""
} else {
error "Invalid addon_id: ${addon_id}"
}
} elseif {[lindex $path 1] == "delete_firmware_image"} {
regexp {\"version\"\s*:\s*\"([\d\.]+)\"} $data match version
if { [info exists version] && $version != "" } {