Created
April 5, 2015 20:25
-
-
Save richo/0f8f65a69b130bf2da4a 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/sh | |
| set -xe | |
| rust_version=$(head -n 1 RELEASES.md | cut -f 2 -d " ") | |
| major=$(echo "$rust_version" | cut -f 1 -d '.') | |
| minor=$(echo "$rust_version" | cut -f 2 -d '.') | |
| patch=$(echo "$rust_version" | cut -f 3 -d '.') | |
| rust_version="${major}.$minor.${patch}" | |
| rev=`git rev-parse --short @` | |
| branch=$(git symbolic-ref HEAD | sed -e 's|refs/heads/||' -e 's|/|_|g') | |
| if [ "$branch" != "master" ]; then | |
| prefix="~/.rusts/$rust_version-$branch" | |
| else | |
| prefix="~/.rusts/$rust_version-$rev" | |
| fi | |
| ./configure --prefix=$prefix | |
| make -j4 | |
| make install | |
| set +x | |
| echo "You may want to update your dotfiles to use '$(basename ${prefix})'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment