[fix](trx-rs): install binaries under user home
Default installation and removal to /home/sjg/.local/bin while preserving explicit prefix and binary-directory overrides. Update the service examples and README to match. Assisted-By: OpenAI Codex (GPT-5) Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -126,12 +126,12 @@ script/install.sh
|
|||||||
```
|
```
|
||||||
|
|
||||||
This builds in release mode, installs `trx-server`, `trx-client`, and
|
This builds in release mode, installs `trx-server`, `trx-client`, and
|
||||||
`trx-configurator` to `/usr/local/bin` (using `sudo` only if needed), seeds
|
`trx-configurator` to `~/.local/bin`, seeds
|
||||||
`~/.config/trx-rs/trx-rs.toml` from the example (existing config is never
|
`~/.config/trx-rs/trx-rs.toml` from the example (existing config is never
|
||||||
overwritten), and installs `~/.config/systemd/user/{trx-server,trx-client}.service`.
|
overwritten), and installs `~/.config/systemd/user/{trx-server,trx-client}.service`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
script/install.sh --prefix ~/.local # install to ~/.local/bin instead
|
script/install.sh --prefix /opt/trx-rs # choose another installation prefix
|
||||||
script/install.sh --no-sdr # build without SoapySDR support
|
script/install.sh --no-sdr # build without SoapySDR support
|
||||||
script/install.sh --enable-now # also enable + start the services now
|
script/install.sh --enable-now # also enable + start the services now
|
||||||
script/install.sh --help # all options
|
script/install.sh --help # all options
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# Install with `script/install.sh` (which substitutes @BINDIR@ and copies this
|
# Install with `script/install.sh` (which substitutes @BINDIR@ and copies this
|
||||||
# into ~/.config/systemd/user/), or by hand:
|
# into ~/.config/systemd/user/), or by hand:
|
||||||
# sed 's|@BINDIR@|/usr/local/bin|' trx-client.service \
|
# sed "s|@BINDIR@|$HOME/.local/bin|" trx-client.service \
|
||||||
# > ~/.config/systemd/user/trx-client.service
|
# > ~/.config/systemd/user/trx-client.service
|
||||||
# systemctl --user daemon-reload
|
# systemctl --user daemon-reload
|
||||||
# systemctl --user enable --now trx-client.service
|
# systemctl --user enable --now trx-client.service
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# Install with `script/install.sh` (which substitutes @BINDIR@ and copies this
|
# Install with `script/install.sh` (which substitutes @BINDIR@ and copies this
|
||||||
# into ~/.config/systemd/user/), or by hand:
|
# into ~/.config/systemd/user/), or by hand:
|
||||||
# sed 's|@BINDIR@|/usr/local/bin|' trx-server.service \
|
# sed "s|@BINDIR@|$HOME/.local/bin|" trx-server.service \
|
||||||
# > ~/.config/systemd/user/trx-server.service
|
# > ~/.config/systemd/user/trx-server.service
|
||||||
# systemctl --user daemon-reload
|
# systemctl --user daemon-reload
|
||||||
# systemctl --user enable --now trx-server.service
|
# systemctl --user enable --now trx-server.service
|
||||||
|
|||||||
+2
-2
@@ -15,7 +15,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|||||||
BINARIES=(trx-server trx-client trx-configurator)
|
BINARIES=(trx-server trx-client trx-configurator)
|
||||||
|
|
||||||
# --- Defaults (override via flags or environment) ---------------------------
|
# --- Defaults (override via flags or environment) ---------------------------
|
||||||
PREFIX="${PREFIX:-/usr/local}"
|
PREFIX="${PREFIX:-$HOME/.local}"
|
||||||
BINDIR="${BINDIR:-}" # derived from PREFIX unless set explicitly
|
BINDIR="${BINDIR:-}" # derived from PREFIX unless set explicitly
|
||||||
NO_SDR=0
|
NO_SDR=0
|
||||||
DO_BUILD=1
|
DO_BUILD=1
|
||||||
@@ -33,7 +33,7 @@ Usage: script/install.sh [options]
|
|||||||
Build trx-rs (release) and install it.
|
Build trx-rs (release) and install it.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--prefix DIR Install prefix; binaries go to DIR/bin (default: /usr/local)
|
--prefix DIR Install prefix; binaries go to DIR/bin (default: \$HOME/.local)
|
||||||
--bindir DIR Install binaries directly to DIR (overrides --prefix)
|
--bindir DIR Install binaries directly to DIR (overrides --prefix)
|
||||||
--no-sdr Build without SoapySDR support (--no-default-features)
|
--no-sdr Build without SoapySDR support (--no-default-features)
|
||||||
--no-build Skip cargo build; install existing target/release binaries
|
--no-build Skip cargo build; install existing target/release binaries
|
||||||
|
|||||||
+2
-2
@@ -11,7 +11,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
BINARIES=(trx-server trx-client trx-configurator)
|
BINARIES=(trx-server trx-client trx-configurator)
|
||||||
|
|
||||||
PREFIX="${PREFIX:-/usr/local}"
|
PREFIX="${PREFIX:-$HOME/.local}"
|
||||||
BINDIR="${BINDIR:-}"
|
BINDIR="${BINDIR:-}"
|
||||||
PURGE=0
|
PURGE=0
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ usage() {
|
|||||||
Usage: script/uninstall.sh [options]
|
Usage: script/uninstall.sh [options]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--prefix DIR Install prefix binaries were installed under (default: /usr/local)
|
--prefix DIR Install prefix binaries were installed under (default: \$HOME/.local)
|
||||||
--bindir DIR Directory binaries were installed to (overrides --prefix)
|
--bindir DIR Directory binaries were installed to (overrides --prefix)
|
||||||
--purge Also delete the user config directory ($CONFIG_DIR)
|
--purge Also delete the user config directory ($CONFIG_DIR)
|
||||||
-h, --help Show this help
|
-h, --help Show this help
|
||||||
|
|||||||
Reference in New Issue
Block a user