Update 2 files: bootstrap.sh, functions.zsh

This commit is contained in:
2026-08-01 15:19:07 -04:00
parent ff3e48e812
commit 13aca4fca5
2 changed files with 16 additions and 4 deletions
+8 -1
View File
@@ -142,7 +142,14 @@ update_repo() {
local TARGET_DIR="$HOME/.config/dotstate/storage"
if [[ -d "$TARGET_DIR/.git" ]]; then
info "Repository exists. Pulling updates..."
local remote_sha local_sha
remote_sha=$(git ls-remote origin HEAD | awk '{print $1}')
local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD)
if [[ "$remote_sha" == "$local_sha" ]]; then
info "Repository up to date"
return 0
fi
info "Repository out of date. Pulling updates..."
git -C "$TARGET_DIR" pull &>/dev/null
else
info "Repository not found. Cloning..."