Bash install.sh and settings.sh for Linux and macOS

Twins of the PowerShell scripts, needing only bash, curl and one of jq,
node or python3 for JSON. install.sh downloads a release (or installs
from dist/), settings.sh pushes, pulls or diffs User/, both resolve the
code CLI and user folder per platform.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
max
2026-09-08 19:50:07 +02:00
co-authored by Claude Fable 5.1
parent 9085266dd3
commit c058c09050
4 changed files with 451 additions and 3 deletions
+10 -3
View File
@@ -19,6 +19,10 @@ $env:GITEA_TOKEN = '<token>'
# on any machine, including a fresh one
.\scripts\install.ps1 # download from the release and install
.\scripts\settings.ps1 -Pull # apply settings, keybindings, marketplace extensions
# the same on Linux or macOS, no PowerShell needed
scripts/install.sh
scripts/settings.sh --pull
```
Set the server first — either in [`config.json`](config.json) or with `GITEA_URL`,
@@ -55,8 +59,10 @@ are skipped, because those are the three above and they come from the release.
| [`settings.ps1`](scripts/settings.ps1) | `-Push` machine to repo, `-Pull` repo to machine, `-Diff` compares |
| [`dev-link.ps1`](scripts/dev-link.ps1) | Junctions the sources into `~/.vscode/extensions` for development. `-Unlink` undoes it |
| [`ci-release.sh`](scripts/ci-release.sh) | The bash equivalent of `publish.ps1`, for the Gitea Actions runner. `SKIP_PACKAGE=1` uploads `dist/` without rebuilding |
| [`install.sh`](scripts/install.sh) | The bash equivalent of `install.ps1`: `--tag`, `--local`, `--only`, `--uninstall`, `--token` |
| [`settings.sh`](scripts/settings.sh) | The bash equivalent of `settings.ps1`: `--push`, `--pull`, `--diff`, `--no-extensions` |
Every script takes `-?` for its full help.
Every PowerShell script takes `-?` for its full help, the bash ones `--help`.
### Tags
@@ -176,8 +182,9 @@ once installed. Both were checked by hand.
- **`dev-link.ps1` and `install.ps1` conflict.** A junctioned source and an installed
`.vsix` are two copies of the same extension id; VS Code loads one arbitrarily.
`dev-link.ps1 -Unlink` before installing.
- **Linux and macOS need pwsh.** The scripts run under PowerShell 7 (`pwsh`) there and
find VS Code's user folder at `~/.config/Code/User` (`~/Library/Application Support/Code/User`
- **Linux and macOS.** `install.sh` and `settings.sh` are bash twins of the PowerShell
scripts and need only bash, curl and one of jq, node or python3 for JSON. The `.ps1`
scripts also run there under PowerShell 7 (`pwsh`). Both find VS Code's user folder at `~/.config/Code/User` (`~/Library/Application Support/Code/User`
on macOS) and the CLI in the usual apt, snap, flatpak and Homebrew locations. Set
`VSCODE_USER_DIR` for Insiders or a portable install. `dev-link.ps1` makes a symlink
instead of a junction. `ci-release.sh` needs only bash.