install.sh reads INKWELL_SERVER, INKWELL_CHANNEL and INKWELL_TOKEN (#5372)

The installer's environment variables kept the ThoughtSync-era TS_ prefix
after the rename to Inkwell. They are now INKWELL_*, as is the
INKWELL_SERVER_DEFAULT line the server fills in when it serves the script.
The old names are not read any more; the operator approved the clean cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 15:01:13 -04:00
co-authored by Claude Opus 5.5
parent 027ad6f672
commit fae03c7eca
3 changed files with 18 additions and 18 deletions
+9 -9
View File
@@ -22,7 +22,7 @@
# fallback that chased the `v*` release its manifest named. That came out once
# `main` had published to `stable` for real (`b6673c6`); the two channels are the
# same shape now and nothing here should special-case one of them again.
# Pick one with `--channel dev` or `TS_CHANNEL=dev`. Through a pipe the options go
# Pick one with `--channel dev` or `INKWELL_CHANNEL=dev`. Through a pipe the options go
# after a `--`: curl -fsSL <url> | sh -s -- --channel dev
#
# Served from `dev` rather than `main`: `main` exists but trails day-to-day work by
@@ -62,12 +62,12 @@ Inkwell desktop installer.
--channel dev from the forge: rolling build from the latest green push to `dev`
-h, --help this text
The options can also come from TS_SERVER and TS_CHANNEL. Through a pipe, pass
The options can also come from INKWELL_SERVER and INKWELL_CHANNEL. Through a pipe, pass
them after `--`: curl -fsSL <url> | sh -s -- --channel dev
From a server, the download needs a device token: make one in the web app under
Account → Linked devices and paste it when asked. A token typed at the prompt is
revoked again once the download is done. TS_TOKEN supplies one without a prompt,
revoked again once the download is done. INKWELL_TOKEN supplies one without a prompt,
and is left alone, since whoever set it is managing it.
USAGE
}
@@ -75,12 +75,12 @@ USAGE
# The address of the server that served this script. Written by that server
# (src/inkwell/installer.py rewrites exactly this line) and empty in the copy the
# forge serves, which is what keeps the forge path the default there.
TS_SERVER_DEFAULT=""
INKWELL_SERVER_DEFAULT=""
# --- channel ----------------------------------------------------------------
channel="${TS_CHANNEL:-stable}"
channel_asked="${TS_CHANNEL:-}"
server="${TS_SERVER:-$TS_SERVER_DEFAULT}"
channel="${INKWELL_CHANNEL:-stable}"
channel_asked="${INKWELL_CHANNEL:-}"
server="${INKWELL_SERVER:-$INKWELL_SERVER_DEFAULT}"
while [ $# -gt 0 ]; do
case "$1" in
--channel)
@@ -200,11 +200,11 @@ say "Installing ${version:-unknown} from $server"
# The token, from the environment or from the person at the keyboard. Read from the
# TERMINAL, not stdin: through `curl | sh`, stdin is this script.
token="${TS_TOKEN:-}"
token="${INKWELL_TOKEN:-}"
prompted=""
if [ -z "$token" ]; then
{ [ -r /dev/tty ] && [ -w /dev/tty ]; } ||
die "the download needs a device token and there's no terminal to ask on; set TS_TOKEN."
die "the download needs a device token and there's no terminal to ask on; set INKWELL_TOKEN."
printf 'A device token is needed to download from %s.\n' "$server" > /dev/tty
printf 'Make one in the web app under Account → Linked devices (it is revoked once the download is done).\n' > /dev/tty
printf 'Token: ' > /dev/tty