1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-23 10:59:06 +01:00

Repaired plugin reinstall

This commit is contained in:
Lukas Macura 2016-12-12 11:07:11 +01:00
parent e826283c85
commit c1f5eddb5d
2 changed files with 10 additions and 1 deletions

View File

@ -78,6 +78,12 @@ zaf_plugin_info() {
echo
}
# Get global plugin parameters
# $1 plugin
zaf_get_plugin_parameters() {
zaf_ctrl_get_global_option "${ZAF_PLUGINS_DIR}/${p}/control.zaf" "Parameters" | while read param rest; do echo $param; done
}
# Set plugin global parameter
# $1 plugindir
# $2 parameter

5
zaf
View File

@ -239,8 +239,11 @@ reinstall)
[ -z "$1" ] && echo "$0 reinstall plugin [plugin]..."
for p in $@; do
if zaf_is_plugin "$p"; then
(zaf_ctrl_get_global_option "${ZAF_PLUGINS_DIR}/${p}" "Parameters"; echo) | while read param; do
params=$(zaf_get_plugin_parameters)
zaf_wrn $params
for param in $params; do
eval export ZAF_${p}_${param}=$(zaf_get_plugin_parameter "${ZAF_PLUGINS_DIR}/${p}" $param)
zaf_dbg "Saving ZAF_${p}_${param}"
done
zaf_remove_plugin "$(basename $p)"
reinstalled=1