mirror of
https://github.com/limosek/zaf.git
synced 2024-11-21 18:09:06 +01:00
On package reinstall, all options are saved
This commit is contained in:
parent
e8be02436c
commit
e826283c85
@ -152,7 +152,7 @@ zaf_install_plugin() {
|
|||||||
zaf_touch "${plugindir}/postinst.need"
|
zaf_touch "${plugindir}/postinst.need"
|
||||||
fi
|
fi
|
||||||
zaf_ctrl_install "$url" "${control}" "${plugindir}"
|
zaf_ctrl_install "$url" "${control}" "${plugindir}"
|
||||||
rm "${plugindir}/params"
|
rm -f "${plugindir}/params"
|
||||||
zaf_touch "${plugindir}/params"
|
zaf_touch "${plugindir}/params"
|
||||||
(zaf_ctrl_get_global_option "${control}" "Parameters"; echo) | \
|
(zaf_ctrl_get_global_option "${control}" "Parameters"; echo) | \
|
||||||
while read param default; do
|
while read param default; do
|
||||||
|
3
zaf
3
zaf
@ -239,6 +239,9 @@ reinstall)
|
|||||||
[ -z "$1" ] && echo "$0 reinstall plugin [plugin]..."
|
[ -z "$1" ] && echo "$0 reinstall plugin [plugin]..."
|
||||||
for p in $@; do
|
for p in $@; do
|
||||||
if zaf_is_plugin "$p"; then
|
if zaf_is_plugin "$p"; then
|
||||||
|
(zaf_ctrl_get_global_option "${ZAF_PLUGINS_DIR}/${p}" "Parameters"; echo) | while read param; do
|
||||||
|
eval export ZAF_${p}_${param}=$(zaf_get_plugin_parameter "${ZAF_PLUGINS_DIR}/${p}" $param)
|
||||||
|
done
|
||||||
zaf_remove_plugin "$(basename $p)"
|
zaf_remove_plugin "$(basename $p)"
|
||||||
reinstalled=1
|
reinstalled=1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user