mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 11:37:40 +00:00
Upload and install addon from file
This commit is contained in:
@@ -971,14 +971,19 @@ proc ::rmupdate::install_addon {{addon_id ""} {download_url ""}} {
|
||||
|
||||
set_running_installation "Addon ${addon_id}"
|
||||
|
||||
write_log 3 "Downloading addon from ${download_url}."
|
||||
set archive_file "/tmp/${addon_id}.tar.gz"
|
||||
if {[file exists $archive_file]} {
|
||||
file delete $archive_file
|
||||
set archive_file ""
|
||||
regexp {^file://(.*)$} $download_url match archive_file
|
||||
if { [info exists archive_file] && $archive_file != "" } {
|
||||
write_log 3 "Installing addon from local file ${archive_file}."
|
||||
} else {
|
||||
write_log 3 "Downloading addon from ${download_url}."
|
||||
set archive_file "/tmp/${addon_id}.tar.gz"
|
||||
if {[file exists $archive_file]} {
|
||||
file delete $archive_file
|
||||
}
|
||||
exec /usr/bin/wget "${download_url}" --no-check-certificate --quiet --output-document=$archive_file
|
||||
}
|
||||
|
||||
exec /usr/bin/wget "${download_url}" --no-check-certificate --quiet --output-document=$archive_file
|
||||
|
||||
write_log 3 "Extracting archive ${archive_file}."
|
||||
set tmp_dir "/tmp/rmupdate_addon_install_${addon_id}"
|
||||
if {[file exists $tmp_dir]} {
|
||||
|
Reference in New Issue
Block a user