1f64fa92f524d47a87320a4baf9d9883fd23ab5e

Author
Fabian Wolff <fabi.wolff@arcor.de>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Convert "if then" statements to "if; then" one-liners

Diff

 1diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
 2index 3c9a4e4ca640409e2045bab0d37d4ec24c9be790..a57f6da0fcad62a4a048e4d4769a9b4102805f41 100644
 3--- a/tools/check_for_upgrade.sh
 4+++ b/tools/check_for_upgrade.sh
 5@@ -29,10 +29,8 @@ fi
 6 # Cancel upgrade if git is unavailable on the system
 7 whence git >/dev/null || return 0
 8 
 9-if mkdir "$ZSH/log/update.lock" 2>/dev/null
10-then
11-  if [ -f ~/.zsh-update ]
12-  then
13+if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
14+  if [ -f ~/.zsh-update ]; then
15     . ~/.zsh-update
16 
17     if [[ -z "$LAST_EPOCH" ]]; then
18@@ -40,10 +38,8 @@ then
19     fi
20 
21     epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
22-    if [ $epoch_diff -gt $epoch_target ]
23-    then
24-      if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
25-      then
26+    if [ $epoch_diff -gt $epoch_target ]; then
27+      if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then
28         _upgrade_zsh
29       else
30         echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"