1
0
Fork 0
mirror of synced 2024-05-25 11:31:14 -04:00
zimfw/src/stage2/50_zimfw_uninstall.zsh.erb
Eric Nielsen ee99fe8a36
Add -v (verbose) option
so the normal output is focused on the given action, and output for
additional steps perfomed after the given action is only shown in
verbose mode.

Also, the output of wget is only shown in verbose mode. This is because
wget always shows some output (to stderr) even when there are no errors.
See https://serverfault.com/q/70889/302338

This should give a friendlier output.
See #360
2020-01-11 16:34:36 -05:00

13 lines
414 B
Plaintext

_zimfw_uninstall() {
local zopt zdir zmodule
(( _zprintlevel > 0 )) && zopt='-v'
for zdir in ${ZIM_HOME}/modules/*(N/); do
zmodule=${zdir:t}
# If _zmodules and _zdisableds do not contain the zmodule
if (( ! ${_zmodules[(I)${zmodule}]} && ! ${_zdisableds[(I)${zmodule}]} )); then
command rm -rf ${zopt} ${zdir} || return 1
fi
done
_zimfw_print -P '<%= done %>Done with uninstall.'
}