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:
parent
8abf0306f7
commit
26b58a61d5
@ -272,7 +272,9 @@ zaf_discovery_plugins() {
|
|||||||
zaf_list_plugins | zaf_discovery '{#PLUGIN}'
|
zaf_list_plugins | zaf_discovery '{#PLUGIN}'
|
||||||
}
|
}
|
||||||
|
|
||||||
zaf_plugin_version() {
|
# $1 plugin
|
||||||
|
# $2 ctrl_option
|
||||||
|
zaf_plugin_option() {
|
||||||
local plugindir
|
local plugindir
|
||||||
local cfile
|
local cfile
|
||||||
|
|
||||||
@ -282,12 +284,28 @@ zaf_plugin_version() {
|
|||||||
if zaf_is_plugin "$1"; then
|
if zaf_is_plugin "$1"; then
|
||||||
plugindir="${ZAF_PLUGINS_DIR}/$1"
|
plugindir="${ZAF_PLUGINS_DIR}/$1"
|
||||||
cfile="$plugindir/control.zaf"
|
cfile="$plugindir/control.zaf"
|
||||||
zaf_ctrl_get_global_option $cfile Version
|
zaf_ctrl_get_global_option $cfile $2
|
||||||
else
|
else
|
||||||
zaf_err "Plugin $1 not installed."
|
zaf_err "Plugin $1 not installed."
|
||||||
fi
|
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() {
|
zaf_list_plugin_items() {
|
||||||
local items
|
local items
|
||||||
local i
|
local i
|
||||||
|
Loading…
Reference in New Issue
Block a user