Update 2 files: bootstrap.sh, functions.zsh
This commit is contained in:
@@ -11,13 +11,13 @@ install_opencode(){
|
||||
curl -fsSL https://opencode.ai/install | bash
|
||||
}
|
||||
|
||||
update_repo() {
|
||||
dotstate_update() {
|
||||
local REPO_URL="https://git.jeremymcclure.com/jeremy/dotstate-storage.git"
|
||||
local TARGET_DIR="$HOME/.config/dotstate/storage"
|
||||
|
||||
if [[ -d "$TARGET_DIR/.git" ]]; then
|
||||
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)
|
||||
if [[ "$remote_sha" == "$local_sha" ]]; then
|
||||
info "Repository up to date"
|
||||
@@ -29,4 +29,6 @@ update_repo() {
|
||||
info "Repository not found. Cloning..."
|
||||
git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null
|
||||
fi
|
||||
dotstate activate
|
||||
exec zsh
|
||||
}
|
||||
Reference in New Issue
Block a user