diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-06-28 18:54:26 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-06-28 18:54:59 +0200 |
commit | 97cf0bf4bd7655767e9e5ea27ddb6fbe550a305d (patch) | |
tree | 9627008e7ffdee593799b56fae1bd24788ab4aa9 | |
parent | 48b98b957ecfb53a9d2925c03a1524197bd87894 (diff) | |
download | zsh-97cf0bf4bd7655767e9e5ea27ddb6fbe550a305d.tar.gz zsh-97cf0bf4bd7655767e9e5ea27ddb6fbe550a305d.tar.bz2 zsh-97cf0bf4bd7655767e9e5ea27ddb6fbe550a305d.zip |
update: change dash in function name for sh compat (fixes #9064)
-rw-r--r-- | tools/check_for_upgrade.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 368b30d25..c91431c25 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -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 |