https://github.com/rossmacarthur/install
Install a Rust crate from a GitHub release
https://github.com/rossmacarthur/install
crate download linux macos release rust windows
Last synced: 10 months ago
JSON representation
Install a Rust crate from a GitHub release
- Host: GitHub
- URL: https://github.com/rossmacarthur/install
- Owner: rossmacarthur
- License: apache-2.0
- Created: 2019-10-24T15:47:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-22T12:13:05.000Z (over 5 years ago)
- Last Synced: 2025-04-07T17:41:05.355Z (about 1 year ago)
- Topics: crate, download, linux, macos, release, rust, windows
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Install
This repository just contains a little script that can be downloaded from the
internet to install a Rust crate from a GitHub release. It determines the latest
release, the current platform (without the need for `rustc`), and installs the
extracted binary to the specified location.
## Usage
To install a crate simply run the following
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo "/" --to ~/.cargo/bin
```
## Examples
#### [cross](https://github.com/rust-embedded/cross)
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo rust-embedded/cross --to /usr/local/bin
```
#### [hyperfine](https://github.com/sharkdp/hyperfine)
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo sharkdp/hyperfine --to /usr/local/bin
```
#### [just](https://github.com/casey/just)
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo casey/just --to /usr/local/bin
```
#### [ripgrep](https://github.com/BurntSushi/ripgrep)
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo BurntSushi/ripgrep --bin rg --to /usr/local/bin
```
#### [sheldon](https://github.com/rossmacarthur/sheldon)
```sh
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
| bash -s -- --repo rossmacarthur/sheldon --to /usr/local/bin
```
## Acknowledgements
This script was inspired by the [japaric/trust] install script. The platform
detection code is taken from [rust-lang/rustup].
[japaric/trust]: https://github.com/japaric/trust
[rust-lang/rustup]: https://github.com/rust-lang/rustup
## License
This project is licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)