2016-10-25 17:11:26 +02:00
|
|
|
local usage="${0} [action]
|
2016-09-03 03:28:29 +02:00
|
|
|
Actions:
|
|
|
|
| update | Fetches and merges upstream zim commits if possible |
|
|
|
|
| info | Prints zim and system info |
|
2016-09-06 01:34:27 +02:00
|
|
|
| issue | Create a template for reporting an issue |
|
2016-09-03 03:28:29 +02:00
|
|
|
| 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 |
|
2016-09-06 22:04:58 +02:00
|
|
|
| help | Print this usage message |
|
|
|
|
| debug | Invokes the trace-zim script which produces logs |"
|
2016-09-03 03:28:29 +02:00
|
|
|
|
|
|
|
if (( ${#} != 1 )); then
|
|
|
|
print ${usage}
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
local tools
|
2017-09-04 00:51:46 +02:00
|
|
|
tools="${ZIM_HOME}/tools"
|
2016-09-03 03:28:29 +02:00
|
|
|
|
|
|
|
case ${1} in
|
|
|
|
update) zsh ${tools}/zim_update
|
|
|
|
;;
|
|
|
|
info) zsh ${tools}/zim_info
|
|
|
|
;;
|
2016-09-06 01:34:27 +02:00
|
|
|
issue) zsh ${tools}/zim_issue
|
|
|
|
;;
|
2016-09-03 03:28:29 +02:00
|
|
|
clean-cache) zsh ${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
|
|
|
|
;;
|
2017-09-04 00:51:46 +02:00
|
|
|
debug) zsh ${ZIM_HOME}/modules/debug/functions/trace-zim
|
2016-09-06 22:04:58 +02:00
|
|
|
;;
|
2016-09-03 03:28:29 +02:00
|
|
|
*) print ${usage}
|
|
|
|
;;
|
|
|
|
esac
|