From 96ecd555ca90918c61b9b1d4c6455b12a41cde2e Mon Sep 17 00:00:00 2001 From: Jeremy McClure Date: Sat, 1 Aug 2026 15:14:09 -0400 Subject: [PATCH] Update 1 file: functions.zsh --- default/.config/zsh/functions.zsh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/default/.config/zsh/functions.zsh b/default/.config/zsh/functions.zsh index 4a0a6ec..6f63acb 100644 --- a/default/.config/zsh/functions.zsh +++ b/default/.config/zsh/functions.zsh @@ -5,3 +5,18 @@ fix_btopbg(){ install_opencode(){ curl -fsSL https://opencode.ai/install | bash } + +update_repo() { + local REPO_URL="https://git.jeremymcclure.com/jeremy/dotstate-storage.git" + local TARGET_DIR="$HOME/.config/dotstate/storage" + + if [[ -d "$TARGET_DIR/.git" ]]; then + info "Repository exists. Pulling updates..." + git -C "$TARGET_DIR" pull &>/dev/null + else + info "Repository not found. Cloning..." + git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null + fi + + exec zsh +} \ No newline at end of file