mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
if ZDOTDIR is set, put .zsh-update there
This commit is contained in:
parent
f642fcecaf
commit
35bdbeb242
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ function _current_epoch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _update_zsh_update() {
|
function _update_zsh_update() {
|
||||||
echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update
|
echo "LAST_EPOCH=$(_current_epoch)" >! ${ZDOTDIR:-${HOME}}/.zsh-update
|
||||||
}
|
}
|
||||||
|
|
||||||
function _upgrade_zsh() {
|
function _upgrade_zsh() {
|
||||||
|
|
@ -29,9 +29,9 @@ fi
|
||||||
# Cancel upgrade if git is unavailable on the system
|
# Cancel upgrade if git is unavailable on the system
|
||||||
whence git >/dev/null || return 0
|
whence git >/dev/null || return 0
|
||||||
|
|
||||||
if [ -f ~/.zsh-update ]
|
if [ -f ${ZDOTDIR:-${HOME}}/.zsh-update ]
|
||||||
then
|
then
|
||||||
. ~/.zsh-update
|
. ${ZDOTDIR:-${HOME}}/.zsh-update
|
||||||
|
|
||||||
if [[ -z "$LAST_EPOCH" ]]; then
|
if [[ -z "$LAST_EPOCH" ]]; then
|
||||||
_update_zsh_update && return 0;
|
_update_zsh_update && return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue