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
97cf0bf4
Commit
97cf0bf4
authored
Jun 28, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: change dash in function name for sh compat (fixes #9064)
parent
48b98b95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
check_for_upgrade.sh
tools/check_for_upgrade.sh
+5
-5
No files found.
tools/check_for_upgrade.sh
View file @
97cf0bf4
...
@@ -19,13 +19,13 @@ function current_epoch() {
...
@@ -19,13 +19,13 @@ function current_epoch() {
echo
$((
EPOCHSECONDS
/
60
/
60
/
24
))
echo
$((
EPOCHSECONDS
/
60
/
60
/
24
))
}
}
function
update_last
-
updated_file
()
{
function
update_last
_
updated_file
()
{
echo
"LAST_EPOCH=
$(
current_epoch
)
"
>!
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
echo
"LAST_EPOCH=
$(
current_epoch
)
"
>!
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
}
}
function
update_ohmyzsh
()
{
function
update_ohmyzsh
()
{
ZSH
=
"
$ZSH
"
sh
"
$ZSH
/tools/upgrade.sh"
ZSH
=
"
$ZSH
"
sh
"
$ZSH
/tools/upgrade.sh"
update_last
-
updated_file
update_last
_
updated_file
}
}
()
{
()
{
...
@@ -55,7 +55,7 @@ function update_ohmyzsh() {
...
@@ -55,7 +55,7 @@ function update_ohmyzsh() {
# Create or update .zsh-update file if missing or malformed
# Create or update .zsh-update file if missing or malformed
if
!
source
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
2>/dev/null
||
[[
-z
"
$LAST_EPOCH
"
]]
;
then
if
!
source
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
2>/dev/null
||
[[
-z
"
$LAST_EPOCH
"
]]
;
then
update_last
-
updated_file
update_last
_
updated_file
return
return
fi
fi
...
@@ -80,9 +80,9 @@ function update_ohmyzsh() {
...
@@ -80,9 +80,9 @@ function update_ohmyzsh() {
[[
"
$option
"
!=
$'
\n
'
]]
&&
echo
[[
"
$option
"
!=
$'
\n
'
]]
&&
echo
case
"
$option
"
in
case
"
$option
"
in
[
yY
$'
\n
'
]
)
update_ohmyzsh
;;
[
yY
$'
\n
'
]
)
update_ohmyzsh
;;
[
nN]
)
update_last
-
updated_file
;;
[
nN]
)
update_last
_
updated_file
;;
esac
esac
fi
fi
}
}
unset
-f
current_epoch update_last
-
updated_file update_ohmyzsh
unset
-f
current_epoch update_last
_
updated_file update_ohmyzsh
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