Skip to content

Commit

Permalink
README: add installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Oct 12, 2024
1 parent 388bf51 commit b13a3a2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,58 @@ staticd

Download statically linked binaries from GitHub.

## Install

To install `staticd`, go to the [releases page][releases] and follow the instructions below:

- Download the binary for your OS and architecture.
- Make the binary executable:

```
chmod +x staticd-<os>-<arch>
```

From there, you can either opt for the home directory installation (recommended) or the system-wide installation.

### Home-based installation

- Create the `~/.local/bin` directory if it does not exist:
```
mkdir -p ~/.local/bin
```

- Move the binary to `~/.local/bin`:
```
mv staticd-<os>-<arch> ~/.local/bin/staticd
```

- Ensure `$HOME/.local/bin` is in your `$PATH`. Add the following line to your `~/.bashrc` or equivalent shell configuration file:
```
export PATH="$HOME/.local/bin:$PATH"
```

P.s.: use `$HOME` instead of `~/` as [tilde does not expand in quotes][SC2088].

### System-wide installation

- Move the binary to `/usr/local/bin`:
```
sudo mv staticd-<os>-<arch> /usr/local/bin/staticd
```

After installation, you can run the tool by calling the `staticd` command.

## Usage

```
$ staticd <tool>
```

It's important to note that:

- Calling it directly as a non-root user puts the binaries into `~/.local/bin`.
- Calling it using `sudo` puts the binaries into `/usr/local/bin`.

## Tools

- `bat`: [sharkdp/bat][bat], a cat(1) clone with wings.
Expand All @@ -30,7 +76,9 @@ $ staticd <tool>
[flyctl]: https://github.com/superfly/flyctl
[k9s]: https://github.com/derailed/k9s
[kubectx]: https://github.com/ahmetb/kubectx
[releases]: https://github.com/myhro/staticd/releases
[rg]: https://github.com/BurntSushi/ripgrep
[SC2088]: https://www.shellcheck.net/wiki/SC2088
[shellcheck]: https://github.com/koalaman/shellcheck
[upx]: https://github.com/upx/upx
[uv]: https://github.com/astral-sh/uv
Expand Down

0 comments on commit b13a3a2

Please sign in to comment.