Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
1f64fa92
Commit
1f64fa92
authored
Oct 03, 2016
by
Fabian Wolff
Committed by
Marc Cornellà
Oct 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert "if then" statements to "if; then" one-liners
parent
4fa6be02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
check_for_upgrade.sh
tools/check_for_upgrade.sh
+4
-8
No files found.
tools/check_for_upgrade.sh
View file @
1f64fa92
...
@@ -29,10 +29,8 @@ fi
...
@@ -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
...
@@ -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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment