hex/scripts/install-linux.sh
Dax Raad 5bb394f05e feat(linux): source installs update from their checkout, not the release feed
scripts/install-linux.sh marks the version it installs as a source build.
The updater checks only release installs, so the signed feed never replaces
a build from a checkout, and Settings says the checkout updates it.
2026-10-22 19:53:16 -04:00

22 lines
624 B
Shell
Executable file

#!/bin/sh
set -eu
root=$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)
installer="$root/scripts/install-linux-release.sh"
if [ "${1:-install}" = uninstall ]; then
exec "$installer" uninstall
fi
if [ "${1:-install}" != install ]; then
echo "Usage: $0 [install|uninstall]" >&2
exit 1
fi
version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' "$root/Cargo.toml" | head -1)
target_dir=${CARGO_TARGET_DIR:-"$root/target"}
cargo build --locked --release --manifest-path "$root/Cargo.toml"
HEX_INSTALL_SOURCE=1 \
HEX_INSTALL_ARTIFACT="$target_dir/release/voice-control" \
HEX_INSTALL_VERSION="$version" \
exec "$installer"