Last active
January 3, 2024 12:50
-
-
Save chshersh/61240e8e6eeeddd139781e6b9c54a6fe to your computer and use it in GitHub Desktop.
Installing from GitHub releases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -Eeuxo pipefail | |
# This script installs a developer tool on your machine | |
# by downloading an executable (ideally, statically linked) | |
# from GitHub releases | |
## Example: ripgrep | |
dir=$(mktemp --tmpdir --directory ripgrep-XXXX) | |
curl -L https://github.com/BurntSushi/ripgrep/releases/download/14.0.3/ripgrep-14.0.3-aarch64-apple-darwin.tar.gz > "$dir/ripgrep.tar.gz" | |
tar -xzf "$dir/ripgrep.tar.gz" --directory=$dir | |
cp "$dir/ripgrep-14.0.3-aarch64-apple-darwin/rg" ~/.local/bin/rg | |
chmod +x ~/.local/bin/rg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment