Update 2 files: bootstrap.sh, functions.zsh

This commit is contained in:
2026-08-01 15:21:33 -04:00
parent 13aca4fca5
commit 69846ebc38
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ update_repo() {
if [[ -d "$TARGET_DIR/.git" ]]; then if [[ -d "$TARGET_DIR/.git" ]]; then
local remote_sha local_sha local remote_sha local_sha
remote_sha=$(git ls-remote origin 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 if [[ "$remote_sha" == "$local_sha" ]]; then
info "Repository up to date" info "Repository up to date"
+4 -2
View File
@@ -11,13 +11,13 @@ install_opencode(){
curl -fsSL https://opencode.ai/install | bash curl -fsSL https://opencode.ai/install | bash
} }
update_repo() { dotstate_update() {
local REPO_URL="https://git.jeremymcclure.com/jeremy/dotstate-storage.git" local REPO_URL="https://git.jeremymcclure.com/jeremy/dotstate-storage.git"
local TARGET_DIR="$HOME/.config/dotstate/storage" local TARGET_DIR="$HOME/.config/dotstate/storage"
if [[ -d "$TARGET_DIR/.git" ]]; then if [[ -d "$TARGET_DIR/.git" ]]; then
local remote_sha local_sha local remote_sha local_sha
remote_sha=$(git ls-remote origin 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 if [[ "$remote_sha" == "$local_sha" ]]; then
info "Repository up to date" info "Repository up to date"
@@ -29,4 +29,6 @@ update_repo() {
info "Repository not found. Cloning..." info "Repository not found. Cloning..."
git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null
fi fi
dotstate activate
exec zsh
} }