2019-12-14 22:21:34 -05:00
|
|
|
_zimfw_compile() {
|
2022-01-10 09:29:32 -05:00
|
|
|
# Compile Zim 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-06-15 10:33:14 -04:00
|
|
|
_zimfw_print -PR "%F{yellow}<%= warn %>%B${zroot_dir}:%b No write permission, unable to compile.%f"
|
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
|
|
|
|
zcompile -UR ${zfile} && _zimfw_print -PR "<%= okay %>%B${zfile}.zwc:%b Compiled"
|
|
|
|
fi
|
|
|
|
done
|
2022-01-10 09:29:32 -05:00
|
|
|
done
|
2022-01-10 20:41:50 -05:00
|
|
|
_zimfw_print -P '<%= done %>Done with compile.'
|
2019-12-14 22:21:34 -05:00
|
|
|
}
|