|
|
|
@ -48,14 +48,17 @@ function update_ohmyzsh() { |
|
|
|
return |
|
|
|
return |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Remove lock directory on exit. `return 1` is important for when trapping a SIGINT: |
|
|
|
# Remove lock directory on exit. `return $ret` is important for when trapping a SIGINT: |
|
|
|
# The return status from the function is handled specially. If it is zero, the signal is |
|
|
|
# The return status from the function is handled specially. If it is zero, the signal is |
|
|
|
# assumed to have been handled, and execution continues normally. Otherwise, the shell |
|
|
|
# assumed to have been handled, and execution continues normally. Otherwise, the shell |
|
|
|
# will behave as interrupted except that the return status of the trap is retained. |
|
|
|
# will behave as interrupted except that the return status of the trap is retained. |
|
|
|
|
|
|
|
# This means that for a CTRL+C, the trap needs to return the same exit status so that |
|
|
|
|
|
|
|
# the shell actually exits what it's running. |
|
|
|
trap " |
|
|
|
trap " |
|
|
|
unset -f current_epoch update_last_updated_file update_ohmyzsh |
|
|
|
ret=\$? |
|
|
|
command rm -rf '$ZSH/log/update.lock' |
|
|
|
unset -f current_epoch update_last_updated_file update_ohmyzsh 2>/dev/null |
|
|
|
return 1 |
|
|
|
command rm -rf '$ZSH/log/update.lock' |
|
|
|
|
|
|
|
return \$ret |
|
|
|
" EXIT INT QUIT |
|
|
|
" EXIT INT QUIT |
|
|
|
|
|
|
|
|
|
|
|
# Create or update .zsh-update file if missing or malformed |
|
|
|
# Create or update .zsh-update file if missing or malformed |
|
|
|
|