2019-12-14 22:21:34 -05:00
|
|
|
_zimfw_build_login_init() {
|
2020-07-04 15:59:37 -04:00
|
|
|
# Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
|
|
|
|
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
|
2021-07-11 16:58:15 -04:00
|
|
|
local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)") ztarget=${ZIM_HOME}/login_init.zsh
|
2020-11-23 09:38:08 -05:00
|
|
|
# Force update of login_init.zsh if it's older than .zimrc
|
|
|
|
if [[ ${ztarget} -ot <%= home %>/.zimrc ]]; then
|
|
|
|
command mv -f ${ztarget}{,.old} || return 1
|
|
|
|
fi
|
2019-12-14 22:21:34 -05:00
|
|
|
_zimfw_mv =(
|
|
|
|
print -Rn "<%= render_escaped("src/templates/login_init.zsh.erb") %>"
|
|
|
|
) ${ztarget}
|
|
|
|
}
|