Created
August 20, 2015 20:23
-
-
Save saml/57a82feecd031369e3ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| if (( $# < 1 )) | |
| then | |
| echo "Usage: $0 prefix" | |
| exit 1 | |
| fi | |
| p="$1" | |
| cd /tmp | |
| rm -f rustup.sh | |
| wget https://static.rust-lang.org/rustup.sh | |
| sh rustup.sh --prefix="$p" --uninstall | |
| sh rustup.sh --prefix="$p" --disable-sudo --save | |
| v="$(rustc --version|cut -d' ' -f2)" | |
| n="rustc-$v" | |
| f="$n-src.tar.gz" | |
| wget "https://static.rust-lang.org/dist/$f" | |
| tar xvzf "$f" | |
| mv "$n/src" "$p" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment