From 2357724571f4525751120231056b3dc41c536886 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 17 Feb 2018 03:03:36 -0500 Subject: [PATCH] dev/rust: rewrite to use rustup --- dev/rust/_init | 12 ++++++------ dev/rust/env.zsh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/rust/_init b/dev/rust/_init index 9f82aa24..59c66431 100755 --- a/dev/rust/_init +++ b/dev/rust/_init @@ -4,16 +4,16 @@ source env.zsh install() { case $(_os) in - macos) brew install rust - cargo install racer - ;; - arch) pacaur --needed --noconfirm -S rust rust-doc rust-racer ;; + macos) brew install rustup ;; + arch) pacaur --needed --noconfirm -S rustup ;; esac - _ensure_repo rust-lang/rust $RUST_SRC_PATH + rustup install stable + rustup component add rust-src + cargo install racer } update() { - cd $RUST_SRC_PATH && git pull + rustup update } # link() {} diff --git a/dev/rust/env.zsh b/dev/rust/env.zsh index 269e3af5..2c2923ae 100644 --- a/dev/rust/env.zsh +++ b/dev/rust/env.zsh @@ -1,4 +1,4 @@ -export RUST_SRC_PATH=$XDG_DATA_HOME/rust/src export CARGO_HOME="$XDG_DATA_HOME/cargo" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" path=( $CARGO_HOME/bin $path )