diff options
| author | mokou <mokou@posteo.de> | 2020-02-27 19:19:31 +0100 |
|---|---|---|
| committer | mokou <mokou@posteo.de> | 2020-02-27 19:19:31 +0100 |
| commit | 3d9b03c52b8dc51b140757f6fd25ad87b5782ef5 (patch) | |
| tree | 52a1089bb14899dee6bd8a6e2ac3527b3a07791b /install.sh | |
| parent | a03d9655a85351557c466f144a76d6bebfa27256 (diff) | |
fix: Re-add cloning the repo to install scripts
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -82,11 +82,19 @@ else echo "SUCCESS: Rust is up to date" fi +Path=${1:-rustlings/} +echo "Cloning Rustlings at $Path..." +git clone -q https://github.com/rust-lang/rustlings $Path + Version=$(curl -s https://api.github.com/repos/rust-lang/rustlings/releases/latest | python -c "import json,sys;obj=json.load(sys.stdin);print(obj['tag_name']);") CargoBin="${CARGO_HOME:-$HOME/.cargo}/bin" +echo "Checking out version $Version..." +cd $Path +git checkout -q tags/$Version + echo "Installing the 'rustlings' executable..." -cargo install --force --git https://github.com/rust-lang/rustlings --tag $Version +cargo install --force --path . if ! [ -x "$(command -v rustlings)" ] then |
