2019-12-14 22:21:34 -05:00
|
|
|
_zimfw_compile() {
|
2023-09-16 14:16:19 -04:00
|
|
|
# Compile zimfw scripts
|
2022-09-26 21:33:49 -04:00
|
|
|
local zroot_dir zfile
|
|
|
|
for zroot_dir in ${_zroot_dirs:|_zdisabled_root_dirs}; do
|
2023-06-15 10:26:37 -04:00
|
|
|
if [[ ! -w ${zroot_dir} ]]; then
|
2023-09-16 14:16:19 -04:00
|
|
|
_zimfw_print -R $'<%= yellow %><%= warn %><%= bold %>'${zroot_dir}$':<%= normalyellow %> No write permission, unable to compile.<%= normal %>'
|
2023-06-15 10:26:37 -04:00
|
|
|
continue
|
|
|
|
fi
|
2022-09-26 21:33:49 -04:00
|
|
|
for zfile in ${zroot_dir}/(^*test*/)#*.zsh(|-theme)(N-.); do
|
|
|
|
if [[ ! ${zfile}.zwc -nt ${zfile} ]]; then
|
2023-09-16 14:16:19 -04:00
|
|
|
zcompile -UR ${zfile} && _zimfw_print -R $'<%= okay %><%= bold %>'${zfile}$'.zwc:<%= normal %> Compiled'
|
2022-09-26 21:33:49 -04:00
|
|
|
fi
|
|
|
|
done
|
2022-01-10 09:29:32 -05:00
|
|
|
done
|
2023-09-16 14:16:19 -04:00
|
|
|
_zimfw_print 'Done with compile.'
|
2019-12-14 22:21:34 -05:00
|
|
|
}
|