diff options
author | Fabian Wolff <fabi.wolff@arcor.de> | 2016-10-03 11:58:15 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2016-10-03 12:05:10 +0200 |
commit | 1f64fa92f524d47a87320a4baf9d9883fd23ab5e (patch) | |
tree | 87de1b64e626f36bbd9000e296927a33338a7420 /tools/check_for_upgrade.sh | |
parent | 4fa6be02300ff1bbf3772be0c8f7993a46c3769e (diff) | |
download | zsh-1f64fa92f524d47a87320a4baf9d9883fd23ab5e.tar.gz zsh-1f64fa92f524d47a87320a4baf9d9883fd23ab5e.tar.bz2 zsh-1f64fa92f524d47a87320a4baf9d9883fd23ab5e.zip |
Convert "if then" statements to "if; then" one-liners
Diffstat (limited to 'tools/check_for_upgrade.sh')
-rw-r--r-- | tools/check_for_upgrade.sh | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 3c9a4e4ca..a57f6da0f 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -29,10 +29,8 @@ fi # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 -if mkdir "$ZSH/log/update.lock" 2>/dev/null -then - if [ -f ~/.zsh-update ] - then +if mkdir "$ZSH/log/update.lock" 2>/dev/null; then + if [ -f ~/.zsh-update ]; then . ~/.zsh-update if [[ -z "$LAST_EPOCH" ]]; then @@ -40,10 +38,8 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt $epoch_target ] - then - if [ "$DISABLE_UPDATE_PROMPT" = "true" ] - then + if [ $epoch_diff -gt $epoch_target ]; then + if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then _upgrade_zsh else echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" |