Update 2 files: .zshrc, functions.zsh
This commit is contained in:
@@ -13,3 +13,5 @@ source ${ZDOTDIR}/aliases.zsh
|
|||||||
source ${ZDOTDIR}/functions.zsh
|
source ${ZDOTDIR}/functions.zsh
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
dotstate_update
|
||||||
@@ -19,10 +19,7 @@ dotstate_update() {
|
|||||||
local remote_sha local_sha
|
local remote_sha local_sha
|
||||||
remote_sha=$(git ls-remote "$REPO_URL" HEAD | awk '{print $1}')
|
remote_sha=$(git ls-remote "$REPO_URL" HEAD | awk '{print $1}')
|
||||||
local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD)
|
local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD)
|
||||||
if [[ "$remote_sha" == "$local_sha" ]]; then
|
[[ "$remote_sha" == "$local_sha" ]] && return 0
|
||||||
info "Repository up to date"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
info "Repository out of date. Pulling updates..."
|
info "Repository out of date. Pulling updates..."
|
||||||
git -C "$TARGET_DIR" pull &>/dev/null
|
git -C "$TARGET_DIR" pull &>/dev/null
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user