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

Add command "firmware list"

This commit is contained in:
Jan Schneider 2018-08-26 19:26:22 +02:00
parent 63d9b98b02
commit 7de60263b6

View File

@ -25,6 +25,7 @@ proc usage {} {
puts stderr "usage: ${argv0} <module> <command>"
puts stderr ""
puts stderr "possible commands:"
puts stderr " firmware list : list available firmwares"
puts stderr " firmware show_current : show current firmware version"
puts stderr " firmware show_latest : show latest available firmware version"
puts stderr " firmware install_latest : install latest available firmware version"
@ -41,7 +42,12 @@ proc main {} {
set cmd [string tolower [lindex $argv 1]]
if {$mod == "firmware"} {
if {$cmd == "show_current"} {
if {$cmd == "list"} {
foreach e [rmupdate::get_available_firmware_downloads] {
set version [rmupdate::get_version_from_filename $e]
puts $version
}
} elseif {$cmd == "show_current"} {
puts [rmupdate::get_current_firmware_version]
} elseif {$cmd == "show_latest"} {
puts [rmupdate::get_latest_firmware_version]