1
0
Fork 0
mirror of synced 2024-06-15 13:31:09 -04:00
zimfw/src/stage2/31_zimfw_source_zimrc.zsh.erb
Eric Nielsen cffd456556
Add new degit tool \o/
and rename previous to git.

Tools allow for different install and update scripts. The git tool does
what the previous implementation did (installs and updates using the git
client). The new tool installs and updates with the GitHub API, not
using the git client, but using curl/wget and tar instead.

Closes #373
2021-04-07 17:54:47 -05:00

14 lines
420 B
Plaintext

_zimfw_source_zimrc() {
local -r ztarget=<%= home %>/.zimrc
local -r _zargs_action=${1}
local -i _zfailed=0
if ! source ${ztarget} || (( _zfailed )); then
print -u2 -PR "%F{red}<%= failed %>Failed to source %B${ztarget}%b%f"
return 1
fi
if [[ -n ${_zargs_action} && ${#_zmodules_zargs} -eq 0 ]]; then
print -u2 -PR "%F{red}<%= failed %>No modules defined in %B${ztarget}%b%f"
return 1
fi
}