mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
update: change dash in function name for sh compat (fixes #9064)
This commit is contained in:
parent
48b98b957e
commit
97cf0bf4bd
1 changed files with 5 additions and 5 deletions
|
@ -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() {
|
||||||
|
|
||||||
# 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() {
|
||||||
[[ "$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
|
||||||
|
|
Loading…
Reference in a new issue