1
0
Fork 0
mirror of synced 2024-10-10 22:08:57 -04:00

Also force update login_init.zsh

as we do for init.zsh, so behavior is symmetric. This guarantees that
both init.zsh and login_init.zsh will always have newer timestamps than
.zimrc after a build.
This commit is contained in:
Eric Nielsen 2020-11-23 09:38:08 -05:00
parent c6f0720abc
commit dfbe535430
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
2 changed files with 9 additions and 1 deletions

View file

@ -3,6 +3,10 @@ _zimfw_build_login_init() {
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)")
local -r ztarget=${ZIM_HOME}/login_init.zsh
# 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
_zimfw_mv =(
print -Rn "<%= render_escaped("src/templates/login_init.zsh.erb") %>"
) ${ztarget}

View file

@ -69,6 +69,10 @@ _zimfw_build_login_init() {
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)")
local -r ztarget=${ZIM_HOME}/login_init.zsh
# Force update of login_init.zsh if it's older than .zimrc
if [[ ${ztarget} -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
command mv -f ${ztarget}{,.old} || return 1
fi
_zimfw_mv =(
print -Rn "() {
setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB
@ -315,7 +319,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print -R 'zimfw version: '${_zversion}' (previous commit is 78b4711)'
print -R 'zimfw version: '${_zversion}' (previous commit is c6f0720)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)