- lib/distro.sh: add DISTRO_CODENAME from VERSION_CODENAME; remove unused REPO_ADD_RPM variable; export DISTRO_CODENAME - stages/01-repos.sh: replace repeated '. /etc/os-release' subshell calls with $DISTRO_CODENAME in Docker and Tailscale repo lines - stages/00-envcheck.sh: combine four mkdir -p calls into one - stages/02-packages.sh: remove identical if/else branches in fd symlink block; both branches were the same command - stages/03-toolchains.sh: set NVM_DIR once before the if/else instead of twice; remove dead commented-out duplicate curl line - stages/04-shell.sh: capture $(date +%Y%m%d) into _bak_date once per backup and reuse in cp and warn to avoid redundant forks - stages/06-scripts.sh: split 'export VAR=$(cmd)' into assignment + export to correctly propagate errors under set -euo pipefail - stages/07-uv-projects.sh: remove unused has_package_json field (always false, never read); fix stage completion message 06 -> 07 - stages/08-systemd.sh: remove mempi-sync.timer (deploy, enable, header comment); deploy mempi-sync.service only - stages/09-desktop.sh: remove duplicate mkdir -p in COSMIC section; remove unused repo_url parameter from install_nerd_font() - stages/12-other-apps.sh: replace manual distro branch for Nextcloud with pkg_install_mapped - config/scripts/bw-load-ssh.sh: split 'export BW_SESSION=$(cat ...)' into assignment + export - config/systemd/mempi-sync.timer: delete file
85 lines
3.7 KiB
Bash
Executable File
85 lines
3.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ===========================================================================
|
|
# Stage 07: Julian's uv Python Tools — Clone & Install
|
|
# Clones all custom Python tool repos (from GitHub) into ~/Development/
|
|
# and installs them via 'uv tool install' (editable mode from local path).
|
|
# ===========================================================================
|
|
# These are Julian's own CLI tools — the ones installed on Pop via uv.
|
|
# Each has a remote on github.com/julianprester/ (or re3-work/) and a
|
|
# pyproject.toml defining the package.
|
|
#
|
|
# Tools without a public remote (oracle, panac, skill-eval, mondada) are
|
|
# noted — you'll need to push them to GitHub or copy them manually.
|
|
#
|
|
# Order: tools that depend on other tools should come after. Most are
|
|
# independent Python packages.
|
|
# ===========================================================================
|
|
|
|
# Ensure uv is in PATH
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# ---- Define tool repos ----
|
|
# Format: "repo_name:github_org:has_pyproject"
|
|
# repo_name = directory name under ~/Development/
|
|
# github_org = GitHub org (julianprester or re3-work)
|
|
# has_pyproject = true if it has pyproject.toml and should be uv-installed
|
|
|
|
TOOLS=(
|
|
"porridge:julianprester:true" # Zoom meeting transcriber daemon
|
|
"deepis:julianprester:true" # Literature discovery CLI
|
|
"pi-persist:julianprester:true" # Memory persistence (mempi, pi-overview)
|
|
"panac:julianprester:true" # Pandoc wrapper CLI
|
|
"gromd:julianprester:true" # Gromd tool
|
|
"kannwas:julianprester:true" # Kannwas tool
|
|
"tb-api:julianprester:false" # Thunderbird REST API (not a Python pkg — Firefox addon)
|
|
"hotkeys:julianprester:false" # Shell scripts for Wayland hotkeys (no install needed)
|
|
"ocpa-repo:julianprester:true" # OpenCode pi agent Python package
|
|
)
|
|
|
|
# ===========================================================================
|
|
info "Cloning & installing Julian's Python tools..."
|
|
|
|
mkdir -p "$HOME/Development"
|
|
|
|
# ---- Clone and install each tool ----
|
|
for tool_entry in "${TOOLS[@]}"; do
|
|
IFS=':' read -r name org has_pyproject <<< "$tool_entry"
|
|
target_dir="$HOME/Development/$name"
|
|
|
|
if [ -d "$target_dir" ]; then
|
|
ok "Repo '$name' already cloned. Pulling latest..."
|
|
git -C "$target_dir" pull --ff-only 2>/dev/null || warn "Could not pull $name."
|
|
else
|
|
info "Cloning $org/$name..."
|
|
# Try SSH first (requires SSH keys loaded from Bitwarden)
|
|
GIT_TERMINAL_PROMPT=0 git clone "git@github.com:${org}/${name}.git" "$target_dir" 2>/dev/null || {
|
|
# Fallback to HTTPS for public repos (no auth needed)
|
|
GIT_TERMINAL_PROMPT=0 git clone "https://github.com/${org}/${name}.git" "$target_dir" 2>/dev/null || {
|
|
warn "Could not clone ${org}/${name}."
|
|
warn " Load SSH keys from Bitwarden first, then run:"
|
|
warn " git clone git@github.com:${org}/${name}.git ~/Development/$name"
|
|
warn " Or set up a GitHub token for HTTPS authentication."
|
|
continue
|
|
}
|
|
}
|
|
ok "Cloned $org/$name → $target_dir"
|
|
fi
|
|
|
|
# Install via uv if it has pyproject.toml
|
|
if [ "$has_pyproject" = "true" ] && [ -f "$target_dir/pyproject.toml" ]; then
|
|
info "Installing '$name' via uv tool..."
|
|
# Try editable install from local path; fall back to non-editable
|
|
uv tool install --editable "$target_dir" 2>/dev/null || \
|
|
uv tool install "$target_dir" 2>/dev/null || \
|
|
warn "uv tool install failed for '$name'. Check pyproject.toml."
|
|
ok "'$name' installed via uv."
|
|
fi
|
|
done
|
|
|
|
# ---- Verify installations ----
|
|
echo ""
|
|
info "Verifying uv tool installations..."
|
|
uv tool list 2>/dev/null || warn "No uv tools installed."
|
|
|
|
ok "Stage 07 complete: uv tools installed."
|