Compare commits

...

3 Commits

Author SHA1 Message Date
bf19cbf698 minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-04 16:18:26 +03:00
b40c74a723 minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-04 16:16:31 +03:00
d3f15fbffd working on basic template management...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2024-01-04 16:15:12 +03:00

View File

@ -141,6 +141,22 @@ normpath(){
#----------------------------------------------------------------------
#
# getLatestTemplate PATTERN [VAR]
#
getLatestTemplate(){
IFS=$'\n'
local pattern=$1
local tamplates=($(pveam available | grep $1))
local latest=${templates[-1]}
pveam download local ${latest}
[ -z $2 ] \
|| eval "$2=${latest}"
}
#
# xread [-n] MSG VAR
#