-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Rust crate indicatif to 0.17.7
- Loading branch information
1 parent
194889b
commit 1b20e10
Showing
3 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
cd "$(mktemp -d)" | ||
|
||
base_url="https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-" | ||
|
||
os="$(uname -s)" | ||
if [ "$os" == "Darwin" ]; then | ||
url="${base_url}universal-apple-darwin.zip" | ||
curl -LO --proto '=https' --tlsv1.2 -sSf "$url" | ||
unzip cargo-binstall-universal-apple-darwin.zip | ||
elif [ "$os" == "Linux" ]; then | ||
machine="$(uname -m)" | ||
target="${machine}-unknown-linux-musl" | ||
if [ "$machine" == "armv7" ]; then | ||
target="${target}eabihf" | ||
fi | ||
|
||
url="${base_url}${target}.tgz" | ||
curl -L --proto '=https' --tlsv1.2 -sSf "$url" | tar -xvzf - | ||
else | ||
echo "Unsupported OS ${os}" | ||
exit 1 | ||
fi | ||
|
||
./cargo-binstall -y --force cargo-binstall | ||
|
||
CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}" | ||
|
||
if ! [[ ":$PATH:" == *":$CARGO_HOME/bin:"* ]]; then | ||
echo | ||
printf "\033[0;31mYour path is missing %s, you might want to add it.\033[0m\n" "$CARGO_HOME/bin" | ||
echo | ||
fi |