Commit e9f92b2d authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add Rust envvars and a Rustup bootstrap script

parent 9eb25210
Loading
Loading
Loading
Loading

.bin/rustup

0 → 100755
+21 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

URL=https://sh.rustup.rs
BIN=$CARGO_HOME/bin/rustup

test -x $BIN && exec $BIN "$@"

. ~/.shell/funcs

echo >&2 "Bootstrapping Rustup"
echo >&2
if has curl; then
	curl --proto '=https' --tlsv1.2 -sSf $URL
elif has wget; then
	wget -O- $URL
else
	die "Need curl or wget to bootstrap rustup"
fi | sh -s -- -y --no-modify-path

exec $BIN "$@"
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ export EDITOR="$HOME/.vim/bin/vim.remote"
export GOROOT=$HOME/.local/go
export GOPATH=$HOME/.local/gopath
export PYTHONUSERBASE=$HOME/.local
export RUSTUP_HOME=$HOME/.config/rustup
export CARGO_HOME=$HOME/.local/cargo
export LESS=-SR


@@ -43,6 +45,7 @@ manage_path PATH /usr/local/bin before check
manage_path PATH ~/.local/bin before check
manage_path PATH ~/.local/go/bin before
manage_path PATH ~/.local/gopath/bin before
manage_path PATH $CARGO_HOME/bin before
manage_path PATH ~/.local/games check
manage_path PKG_CONFIG_PATH ~/.local/lib/pkgconfig before check
manage_path PREFIX ~/.local check