1
0
Fork 0
mirror of synced 2024-07-01 20:41:09 -04:00
zimfw/modules/meta/functions/zmanage
Eric Nielsen ab3b20f8cd [tools] Clean zcompdump_file and .zwc.old files
Consider the `zcompdump_file` variable, that could be defined in
`.zimrc`, when cleaning the cache.

A custom zcompdump_file would not be cleaned from the cache without this
correction.

Also remove *.zwc.old files from cache, as zrecompile also generates
these.

Closes #218
2017-11-24 19:08:17 -05:00

41 lines
1.4 KiB
Plaintext

local usage="${0} [action]
Actions:
| update | Fetches and merges upstream zim commits if possible |
| info | Prints zim and system info |
| issue | Create a template for reporting an issue |
| clean-cache | Clean the zim cache |
| build-cache | Rebuild the zim cache |
| remove | *experimental* Remove zim as best we can |
| reset | Reset zim to the latest commit |
| help | Print this usage message |
| debug | Invokes the trace-zim script which produces logs |"
if (( ${#} != 1 )); then
print ${usage}
return 1
fi
local tools
tools="${ZIM_HOME}/tools"
case ${1} in
update) zsh ${tools}/zim_update
;;
info) zsh ${tools}/zim_info
;;
issue) zsh ${tools}/zim_issue
;;
clean-cache) source ${tools}/zim_clean_cache && print 'Cleaned cache'
;;
build-cache) source ${tools}/zim_build_cache && print 'Rebuilt cache'
;;
remove) zsh ${tools}/zim_remove
;;
reset) zsh ${tools}/zim_reset
;;
debug) zsh ${ZIM_HOME}/modules/debug/functions/trace-zim
;;
*) print ${usage}
;;
esac