mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-22 12:21:58 +00:00
Convert "if then" statements to "if; then" one-liners
This commit is contained in:
parent
4fa6be0230
commit
1f64fa92f5
1 changed files with 4 additions and 8 deletions
|
@ -29,10 +29,8 @@ fi
|
||||||
# Cancel upgrade if git is unavailable on the system
|
# Cancel upgrade if git is unavailable on the system
|
||||||
whence git >/dev/null || return 0
|
whence git >/dev/null || return 0
|
||||||
|
|
||||||
if mkdir "$ZSH/log/update.lock" 2>/dev/null
|
if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
|
||||||
then
|
if [ -f ~/.zsh-update ]; then
|
||||||
if [ -f ~/.zsh-update ]
|
|
||||||
then
|
|
||||||
. ~/.zsh-update
|
. ~/.zsh-update
|
||||||
|
|
||||||
if [[ -z "$LAST_EPOCH" ]]; then
|
if [[ -z "$LAST_EPOCH" ]]; then
|
||||||
|
@ -40,10 +38,8 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
|
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
|
||||||
if [ $epoch_diff -gt $epoch_target ]
|
if [ $epoch_diff -gt $epoch_target ]; then
|
||||||
then
|
if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then
|
||||||
if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
|
|
||||||
then
|
|
||||||
_upgrade_zsh
|
_upgrade_zsh
|
||||||
else
|
else
|
||||||
echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"
|
echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"
|
||||||
|
|
Loading…
Reference in a new issue