1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-24 03:19:05 +01:00

Added functions for zaf plugin 0.4

This commit is contained in:
Lukas Macura 2016-04-09 12:24:47 +02:00
parent 8abf0306f7
commit 26b58a61d5

View File

@ -272,7 +272,9 @@ zaf_discovery_plugins() {
zaf_list_plugins | zaf_discovery '{#PLUGIN}'
}
zaf_plugin_version() {
# $1 plugin
# $2 ctrl_option
zaf_plugin_option() {
local plugindir
local cfile
@ -282,12 +284,28 @@ zaf_plugin_version() {
if zaf_is_plugin "$1"; then
plugindir="${ZAF_PLUGINS_DIR}/$1"
cfile="$plugindir/control.zaf"
zaf_ctrl_get_global_option $cfile Version
zaf_ctrl_get_global_option $cfile $2
else
zaf_err "Plugin $1 not installed."
fi
}
zaf_plugin_version() {
zaf_plugin_option "$1" Version
}
zaf_plugin_maintainer() {
zaf_plugin_option "$1" Maintainer
}
zaf_plugin_url() {
zaf_plugin_option "$1" Url
}
zaf_plugin_web() {
zaf_plugin_option "$1" Web
}
zaf_plugin_template_url() {
echo $(zaf_plugin_option "$1" Url)/template.xml
}
zaf_list_plugin_items() {
local items
local i