Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ cask "claude"
cask "chatgpt"
cask "block-goose"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Notes & knowledge
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

cask "obsidian"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Productivity & menubar
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
3 changes: 3 additions & 0 deletions src/os/installs/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \
print_in_purple "\n • Installs\n\n"

"./$(get_os)/main.sh"

# Clone personal repos (OS-agnostic; runs after brew + git are installed).
./repos.sh
63 changes: 63 additions & 0 deletions src/os/installs/repos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../utils.sh"

declare -r PROJECTS_DIR="$HOME/projects"

# Repos to clone on a fresh machine, as "<dir-name>|<owner/repo>".
# Existing directories are skipped; failures are non-fatal (a brand-new
# machine may not have SSH/gh auth yet — set it up and re-run).
declare -a REPOS=(
"llm-wiki|lukasjuhas/llm-wiki"
# "consumer-web|POSH-Group/consumer-web"
# add more here as needed
)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

clone_repo() {

local name="${1%%|*}"
local slug="${1#*|}"
local target="$PROJECTS_DIR/$name"
local rc

if [ -d "$target" ]; then
print_success "$name (already present)"
return 0
fi

# Prefer gh (works over HTTPS token even without SSH keys); fall back to SSH.
if cmd_exists "gh" && gh auth status &> /dev/null; then
gh repo clone "$slug" "$target" -- --quiet &> /dev/null
rc=$?
else
git clone --quiet "git@github.com:$slug.git" "$target" &> /dev/null
rc=$?
fi

if [ "$rc" -eq 0 ]; then
print_success "$name (cloned)"
else
print_warning "$name (skipped — clone failed; set up SSH/gh auth and re-run)"
fi

}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

main() {

print_in_purple "\n • Clone repositories\n\n"

mkdir -p "$PROJECTS_DIR"

local repo
for repo in "${REPOS[@]}"; do
clone_repo "$repo"
done

}

main
Loading