Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
97cf0bf4
Commit
97cf0bf4
authored
Jun 28, 2020
by
Marc Cornellà
Browse files
update: change dash in function name for sh compat (fixes #9064)
parent
48b98b95
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/check_for_upgrade.sh
View file @
97cf0bf4
...
...
@@ -19,13 +19,13 @@ function current_epoch() {
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"
}
function
update_ohmyzsh
()
{
ZSH
=
"
$ZSH
"
sh
"
$ZSH
/tools/upgrade.sh"
update_last
-
updated_file
update_last
_
updated_file
}
()
{
...
...
@@ -55,7 +55,7 @@ function update_ohmyzsh() {
# Create or update .zsh-update file if missing or malformed
if
!
source
"
${
ZSH_CACHE_DIR
}
/.zsh-update"
2>/dev/null
||
[[
-z
"
$LAST_EPOCH
"
]]
;
then
update_last
-
updated_file
update_last
_
updated_file
return
fi
...
...
@@ -80,9 +80,9 @@ function update_ohmyzsh() {
[[
"
$option
"
!=
$'
\n
'
]]
&&
echo
case
"
$option
"
in
[
yY
$'
\n
'
]
)
update_ohmyzsh
;;
[
nN]
)
update_last
-
updated_file
;;
[
nN]
)
update_last
_
updated_file
;;
esac
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