summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-27 21:17:42 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-27 21:17:42 (EDT)
commit29ef1086f59edc27cd38c3c4c6e234116a4845e5 (patch)
treec8c738bd92512d1c705c6ab4dde0f93d3e8c48e9 /src
parent8511b1e7a4f91e61b3e0afb66919afb72d046557 (diff)
downloadfirman.sh-29ef1086f59edc27cd38c3c4c6e234116a4845e5.zip
firman.sh-29ef1086f59edc27cd38c3c4c6e234116a4845e5.tar.gz
firman.sh-29ef1086f59edc27cd38c3c4c6e234116a4845e5.tar.bz2
do_update(): Add version selection
Diffstat (limited to 'src')
-rw-r--r--src/action/update.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/action/update.sh b/src/action/update.sh
index 7cbfcf3..cf437b6 100644
--- a/src/action/update.sh
+++ b/src/action/update.sh
@@ -23,6 +23,8 @@ do_update()
local mirror_url=''
local mirror_label=''
local mirror_urls=''
+ local versions=''
+ local version=''
info 'Updating firmware'
@@ -63,5 +65,12 @@ do_update()
mirror_url="$(printf '%s ' ${mirror_urls} | cut -d ' ' -f ${i})"
info 'Mirror: %s' "${mirror_url}"
+ # Select version.
+ versions="$(dist_get_versions "${mirror_url}" "$(board_get)")"
+ i=$(show_menu 'Select a version' ${versions})
+ i=$(($i + 1))
+ version="$(printf '%s ' ${versions} | cut -d ' ' -f ${i})"
+ info 'Version: %s' "${version}"
+
return 0
}