Update 2 files: bootstrap.sh, functions.zsh
This commit is contained in:
+1
-1
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user