Skip to content
Install Script

Install Script

The install script downloads a release from GitHub Releases, verifies its checksum, and installs it:

tmp=$(mktemp)
curl -sSfL https://raw.githubusercontent.com/nicholas-fedor/speedtest-go/master/scripts/install.sh -o "$tmp" && sh "$tmp"

How it installs:

  • On Debian, Fedora, Alpine, Arch Linux, and their derivatives, it installs the native package when it runs as root or can use sudo.
  • Otherwise, it extracts the release archive into $HOME/go/bin.
  • Either way, it verifies the signature of the checksums when cosign is installed.

Options

These environment variables change what it installs:

VariableDescriptionDefault
VERSIONRelease tag to install, such as v2.0.0The latest release
PREFIXDirectory for archive installs$HOME/go/bin, or the directory of the previous archive install
METHODauto, package, or archiveauto

For example, to install the archive into ~/.local/bin:

METHOD=archive PREFIX="$HOME/.local/bin" sh "$tmp"

Releases before v2.0.0 publish their packages under different names, so the script installs them from the archive. METHOD=auto falls back to the archive, and METHOD=package fails.

Update and uninstall

ActionCommand
Update to the latest releasesh "$tmp" update
Remove speedtest-gosh "$tmp" uninstall