1
0
Fork 0
mirror of synced 2024-05-29 05:21:11 -04:00
zimfw/src/stage2/50_zimfw_compile.zsh.erb
Eric Nielsen 2491856a7b
Clean up and simplify code
No need to set zscriptglob in _zimfw_build_login_init anymore.
Use _zimfw_print in _zimfw_compile.
And other minor simplifications.
2022-01-10 20:41:50 -05:00

13 lines
475 B
Plaintext

_zimfw_compile() {
# Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
# Compile Zim scripts
local zfile
for zfile in ${^zscriptdirs}/(^*test*/)#*.zsh(|-theme)(N-.); do
if [[ ! ${zfile}.zwc -nt ${zfile} ]]; then
zcompile -R ${zfile} && _zimfw_print -PR "<%= okay %>%B${zfile}.zwc:%b Compiled"
fi
done
_zimfw_print -P '<%= done %>Done with compile.'
}