1
0
Fork 0
mirror of synced 2024-06-01 23:01:11 -04:00
zimfw/src/stage2/29_zimfw_build_login_init.zsh.erb
Eric Nielsen e54958b91c
Allow customizing .zimrc file path
with the ZIM_CONFIG_FILE environment variable.
Fixes #479.
2022-10-23 19:34:14 -05:00

11 lines
365 B
Plaintext

_zimfw_build_login_init() {
local -r ztarget=${ZIM_HOME}/login_init.zsh
# Force update of login_init.zsh if it's older than .zimrc
if [[ ${ztarget} -ot ${ZIM_CONFIG_FILE:-<%= home %>/.zimrc} ]]; then
command mv -f ${ztarget}{,.old} || return 1
fi
_zimfw_mv =(
print -nR "<%= render_escaped("src/templates/login_init.zsh.erb") %>"
) ${ztarget}
}