Skip to content

Commit

Permalink
Convert "if then" statements to "if; then" one-liners
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianWolff authored and mcornella committed Oct 3, 2016
1 parent 4fa6be0 commit 1f64fa9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tools/check_for_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,17 @@ 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
_update_zsh_update && return 0;
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"
Expand Down

0 comments on commit 1f64fa9

Please sign in to comment.