Merge branch 'develop' into feature/repo-sync
# Conflicts: # .claude/memory/journal.md
This commit is contained in:
@@ -117,3 +117,6 @@ Done: window-style / window-active-style added. Two traps: colour234 ≈ iTerm2
|
|||||||
|
|
||||||
## 2026-10-07 (pm) — repo-sync: multi-forge repo tree
|
## 2026-10-07 (pm) — repo-sync: multi-forge repo tree
|
||||||
Done: `bin/repo-sync` (gitlab/github/gitea/bitbucket cloud via curl+jq, daily cache, mkdir lock, dedup ns/project) + `repo` fn/completion in 3 rc files + install.sh jq + docs. Port of Alphalink dotfiles `repo`/`repo-reset`. Stub-curl harness caught token shift (IFS tab merges empty field); live GitLab 139 projects in 3s. Decided (chat): name `repo-sync`, tokens in `~/.config/repos/forges.conf` 0600, root `~/repos`, Bitbucket Cloud only. On feature/repo-sync, not finished. BDR/LRN offered, not written.
|
Done: `bin/repo-sync` (gitlab/github/gitea/bitbucket cloud via curl+jq, daily cache, mkdir lock, dedup ns/project) + `repo` fn/completion in 3 rc files + install.sh jq + docs. Port of Alphalink dotfiles `repo`/`repo-reset`. Stub-curl harness caught token shift (IFS tab merges empty field); live GitLab 139 projects in 3s. Decided (chat): name `repo-sync`, tokens in `~/.config/repos/forges.conf` 0600, root `~/repos`, Bitbucket Cloud only. On feature/repo-sync, not finished. BDR/LRN offered, not written.
|
||||||
|
|
||||||
|
## 2026-10-07 (2) — macOS zsh default, remote-install prompts
|
||||||
|
Done: choose_macos_shell default bash → zsh (Enter, no tty, unknown value). Found: `curl | bash` path never asked USER/EMAIL (stdin = pipe → `[ -t 0 ]` false → login name + empty email, bash, no offers); remote-install.sh now runs install.sh `</dev/tty` when openable. Found: BRANCH default `master`, origin has only `main` (raw URL 404) → `main`. Lint OK, chooser tested 4 values. Branch feature/macos-zsh-default, not merged. Other session: feature/repo-sync open (CLAUDE.md layout already lists repo-sync).
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ cloudpex/{cloudpex,install.sh,README.md} on-demand SMB mount helper → /usr/loc
|
|||||||
install.sh offers to mask `tmp.mount`. Swap is not the fix (the cap and ENOSPC stay).
|
install.sh offers to mask `tmp.mount`. Swap is not the fix (the cap and ENOSPC stay).
|
||||||
|
|
||||||
macOS: install.sh swaps apt-get for Homebrew (colima for Docker, brew services for
|
macOS: install.sh swaps apt-get for Homebrew (colima for Docker, brew services for
|
||||||
code-server/mariadb, `~/.bash_profile` → `~/.bashrc`), asks bash or zsh (`MACOS_SHELL`
|
code-server/mariadb, `~/.bash_profile` → `~/.bashrc`), asks zsh or bash (zsh by default,
|
||||||
presets it; zsh = oh-my-zsh + `zsh/` files, bash = brew bash 5) and prints the Linux-only
|
`MACOS_SHELL` presets it; zsh = oh-my-zsh + `zsh/` files, bash = brew bash 5) and prints the Linux-only
|
||||||
items it skipped. Keep `bashrc-osx` = `bashrc-linux` + macOS deltas only, and the zsh
|
items it skipped. Keep `bashrc-osx` = `bashrc-linux` + macOS deltas only, and the zsh
|
||||||
files in step with them (same env, aliases, prompt).
|
files in step with them (same env, aliases, prompt).
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Personal dotfiles — vim + bash configuration and a one-shot installer.
|
|||||||
Install everything (clone + setup) with one command:
|
Install everything (clone + setup) with one command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash
|
curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/main/remote-install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
(Runs a remote script through `bash` — see the [Install](#install) section for what it does and the manual alternative.)
|
(Runs a remote script through `bash` — see the [Install](#install) section for what it does and the manual alternative.)
|
||||||
@@ -44,10 +44,10 @@ curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-instal
|
|||||||
### One-liner (clone + install)
|
### One-liner (clone + install)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash
|
curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/main/remote-install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
`remote-install.sh` ensures `git` is present, clones the repo to `~/config` (or pulls if already there), then runs `install.sh`. Override with env vars: `REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash`.
|
`remote-install.sh` ensures `git` is present, clones the repo to `~/config` (or pulls if already there), then runs `install.sh` with the terminal as its stdin, so the questions below (identity, macOS shell, offers) are asked even though the script arrives through a pipe. Override with env vars: `REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash`.
|
||||||
|
|
||||||
> Piping a remote script into `bash` runs unreviewed code over the network. Read [`remote-install.sh`](remote-install.sh) first, or use the manual clone below.
|
> Piping a remote script into `bash` runs unreviewed code over the network. Read [`remote-install.sh`](remote-install.sh) first, or use the manual clone below.
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ The script is re-runnable: each run re-backs up to `~/Oldconfig` (overwriting th
|
|||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
The same `./install.sh` detects macOS and replaces `apt-get` with Homebrew. It first asks which login shell you want, **bash** or **zsh** (`[bash]` by default; answer in advance with `MACOS_SHELL=zsh ./install.sh`, and with no terminal attached it picks bash):
|
The same `./install.sh` detects macOS and replaces `apt-get` with Homebrew. It first asks which login shell you want, **zsh** or **bash** (`[zsh]` by default; answer in advance with `MACOS_SHELL=bash ./install.sh`, and with no terminal attached it picks zsh):
|
||||||
|
|
||||||
1. Installs Homebrew with its official script when `brew` is missing (this also pulls the Xcode Command Line Tools: clang, make, git), then `brew update` + `brew upgrade`.
|
1. Installs Homebrew with its official script when `brew` is missing (this also pulls the Xcode Command Line Tools: clang, make, git), then `brew update` + `brew upgrade`.
|
||||||
2. Installs the apt list mapped to formulae: `vim git git-lfs git-filter-repo gitleaks pkgconf shellcheck gh git-delta curl gnupg lftp inetutils unzip tree tmux fzf dtach node python pipx php mariadb imagemagick ffmpeg weasyprint poppler qpdf webp libavif bash`. Brew's `php` already ships gd, mbstring, xml, intl, curl and mysql.
|
2. Installs the apt list mapped to formulae: `vim git git-lfs git-filter-repo gitleaks pkgconf shellcheck gh git-delta curl gnupg lftp inetutils unzip tree tmux fzf dtach node python pipx php mariadb imagemagick ffmpeg weasyprint poppler qpdf webp libavif bash`. Brew's `php` already ships gd, mbstring, xml, intl, curl and mysql.
|
||||||
|
|||||||
+8
-7
@@ -345,18 +345,19 @@ install_colima_docker() {
|
|||||||
start_brew_service colima
|
start_brew_service colima
|
||||||
}
|
}
|
||||||
|
|
||||||
# macOS login shell: bash (brew's bash 5 + bashrc-osx) or zsh (oh-my-zsh +
|
# macOS login shell: zsh (oh-my-zsh + zshrc-osx, the macOS default) or bash
|
||||||
# zshrc-osx). MACOS_SHELL=bash|zsh answers in advance; with no terminal attached
|
# (brew's bash 5 + bashrc-osx). MACOS_SHELL=bash|zsh answers in advance; with no
|
||||||
# and no answer, bash. Prints the choice on stdout (the question goes to stderr).
|
# terminal attached and no answer, zsh. Prints the choice on stdout (the question
|
||||||
|
# goes to stderr).
|
||||||
choose_macos_shell() {
|
choose_macos_shell() {
|
||||||
local answer="${MACOS_SHELL:-}"
|
local answer="${MACOS_SHELL:-}"
|
||||||
if [ -z "$answer" ] && [ -t 0 ]; then
|
if [ -z "$answer" ] && [ -t 0 ]; then
|
||||||
read -rp "Login shell on macOS: bash or zsh (oh-my-zsh)? [bash] " answer || true
|
read -rp "Login shell on macOS: zsh (oh-my-zsh) or bash? [zsh] " answer || true
|
||||||
fi
|
fi
|
||||||
case "$answer" in
|
case "$answer" in
|
||||||
zsh) echo zsh ;;
|
zsh|"") echo zsh ;;
|
||||||
bash|"") echo bash ;;
|
bash) echo bash ;;
|
||||||
*) echo "Unknown shell '$answer' — using bash" >&2; echo bash ;;
|
*) echo "Unknown shell '$answer' — using zsh" >&2; echo zsh ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-4
@@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# remote-install.sh — one-liner bootstrap: clone this repo, then run install.sh.
|
# remote-install.sh — one-liner bootstrap: clone this repo, then run install.sh.
|
||||||
# Usage:
|
# Usage:
|
||||||
# curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash
|
# curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/main/remote-install.sh | bash
|
||||||
# Override defaults with env vars:
|
# Override defaults with env vars:
|
||||||
# REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash
|
# REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_URL="${REPO_URL:-https://git.bchanot.fr/bchanot/config.git}"
|
REPO_URL="${REPO_URL:-https://git.bchanot.fr/bchanot/config.git}"
|
||||||
CLONE_DIR="${CLONE_DIR:-$HOME/config}"
|
CLONE_DIR="${CLONE_DIR:-$HOME/config}"
|
||||||
BRANCH="${BRANCH:-master}"
|
BRANCH="${BRANCH:-main}"
|
||||||
|
|
||||||
# git is required to fetch the repo. Install it on Debian/Ubuntu, else bail with a hint.
|
# git is required to fetch the repo. Install it on Debian/Ubuntu, else bail with a hint.
|
||||||
if ! command -v git >/dev/null 2>&1; then
|
if ! command -v git >/dev/null 2>&1; then
|
||||||
@@ -36,6 +36,12 @@ else
|
|||||||
git clone --quiet --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
git clone --quiet --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Hand off to the OS-detecting installer.
|
# Hand off to the OS-detecting installer. Piped into bash, stdin is the script
|
||||||
|
# itself, so install.sh would see no terminal and skip every question (identity,
|
||||||
|
# macOS shell, offers). Give it the terminal back when there is one.
|
||||||
echo "Running install.sh"
|
echo "Running install.sh"
|
||||||
bash "$CLONE_DIR/install.sh"
|
if ( : </dev/tty ) 2>/dev/null; then
|
||||||
|
bash "$CLONE_DIR/install.sh" </dev/tty
|
||||||
|
else
|
||||||
|
bash "$CLONE_DIR/install.sh"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user