1
0
Fork 0
mirror of synced 2024-05-25 03:25:19 -04:00
zimfw/src/stage2/31_zimfw_source_zimrc.zsh.erb
Eric Nielsen 8724686e85
Don't depend on cmp and xargs
as they requires busybox or diffutils and findutils.
Use `cksum` and `zargs` instead.

Fixes #393
2020-05-16 20:22:22 -05:00

14 lines
415 B
Plaintext

_zimfw_source_zimrc() {
local -r ztarget=<%= home %>/.zimrc
local -ri _zprepare_zargs=${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 (( _zprepare_zargs && ! ${#_zmodules_zargs} )); then
print -u2 -PR "%F{red}<%= failed %>No modules defined in %B${ztarget}%b%f"
return 1
fi
}