Update 1 file: bootstrap.sh
This commit is contained in:
@@ -135,4 +135,21 @@ for tool in "${BIN_pkgs[@]}"; do
|
|||||||
install_binary "$tool"
|
install_binary "$tool"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
REPO_URL="https://git.jeremymcclure.com/jeremy/dotstate-storage.git"
|
||||||
|
TARGET_DIR="$HOME/.config/dotstate/storage"
|
||||||
|
|
||||||
|
if [[ -d "$TARGET_DIR/.git" ]]; then
|
||||||
|
# Case 1: It is already a git repo -> Pull updates
|
||||||
|
echo "Repository exists. Pulling updates..."
|
||||||
|
git -C "$TARGET_DIR" pull
|
||||||
|
else
|
||||||
|
# Case 2: Not a repo (or doesn't exist) -> Clone fresh
|
||||||
|
# Note: git clone will fail if TARGET_DIR exists as a non-empty non-git dir
|
||||||
|
echo "Repository not found. Cloning..."
|
||||||
|
git clone --depth=1 "$REPO_URL" "$TARGET_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dotstorage doctor --fix
|
||||||
|
dotstorage activate
|
||||||
|
|
||||||
info "done"
|
info "done"
|
||||||
|
|||||||
Reference in New Issue
Block a user