97cf0bf4bd7655767e9e5ea27ddb6fbe550a305d
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
update: change dash in function name for sh compat (fixes #9064)
Diff
1diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
2index 368b30d25d6a9b35e057f2df6830434688f2ebae..c91431c25f3a76da7ead6f317909572380a6f107 100644
3--- a/tools/check_for_upgrade.sh
4+++ b/tools/check_for_upgrade.sh
5@@ -19,13 +19,13 @@ function current_epoch() {
6 echo $(( EPOCHSECONDS / 60 / 60 / 24 ))
7 }
8
9-function update_last-updated_file() {
10+function update_last_updated_file() {
11 echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update"
12 }
13
14 function update_ohmyzsh() {
15 ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh"
16- update_last-updated_file
17+ update_last_updated_file
18 }
19
20 () {
21@@ -55,7 +55,7 @@ function update_ohmyzsh() {
22
23 # Create or update .zsh-update file if missing or malformed
24 if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then
25- update_last-updated_file
26+ update_last_updated_file
27 return
28 fi
29
30@@ -80,9 +80,9 @@ function update_ohmyzsh() {
31 [[ "$option" != $'\n' ]] && echo
32 case "$option" in
33 [yY$'\n']) update_ohmyzsh ;;
34- [nN]) update_last-updated_file ;;
35+ [nN]) update_last_updated_file ;;
36 esac
37 fi
38 }
39
40-unset -f current_epoch update_last-updated_file update_ohmyzsh
41+unset -f current_epoch update_last_updated_file update_ohmyzsh