1
0
Fork 0
mirror of synced 2024-06-17 06:11:09 -04:00
zimfw/src/stage2/50_zimfw_clean_compiled.zsh.erb
Eric Nielsen 6129062139
Fail when no modules defined in .zimrc
instead of allowing xargs to execute the action with no positional
parameters.

Also don't try to write to .latest_version if there's no write
permission. This is supposed to be a background/optional operation, so
we don't want to show an error message in this case.

And use Zsh globs instead of find with -exec, and find won't fail if
there's an error with the -exec command.
2020-01-26 15:33:17 -05:00

8 lines
325 B
Plaintext

_zimfw_clean_compiled() {
local zopt
(( _zprintlevel > 0 )) && zopt='-v'
command rm -f ${zopt} ${ZIM_HOME}/**/*.zwc(|.old) || return 1
command rm -f ${zopt} <%= home %>/<%= startup_files_glob %>.zwc(|.old)(N) || return 1
_zimfw_print -P '<%= done %>Done with clean-compiled. Run %Bzimfw compile%b to re-compile.'
}