Compare commits

...

3 Commits

Author SHA1 Message Date
c21a76907c Fix building rust crates via separate user 2021-10-31 13:09:00 +01:00
36dcdad8b7 Add ~/.cargo/bin to PATH 2021-10-31 12:52:37 +01:00
3215c88ee1 Install rustup on ubuntu 2021-10-31 12:52:37 +01:00
4 changed files with 22 additions and 3 deletions

View File

@@ -306,7 +306,7 @@ packages:
ubuntu: [] ubuntu: []
archlinux: [] archlinux: []
rust: rust:
ubuntu: ["rustc", "cargo"] ubuntu: []
archlinux: ["rustup"] archlinux: ["rustup"]
musescore: musescore:
ubuntu: ["musescore3"] ubuntu: ["musescore3"]

View File

@@ -394,13 +394,21 @@
system: true system: true
become: true become: true
- name: install rustup on ubuntu
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
args:
creates: /var/lib/rust_build/.cargo/bin/rustup
become: true
become_user: rust_build
when: distro == 'ubuntu'
- name: add rustup stable toolchain - name: add rustup stable toolchain
command: rustup default stable shell: . ~/.cargo/env && rustup default stable
become: true become: true
become_user: rust_build become_user: rust_build
- name: update rustup stable toolchain - name: update rustup stable toolchain
command: rustup update stable shell: . ~/.cargo/env && rustup update stable
become: true become: true
become_user: rust_build become_user: rust_build
@@ -428,6 +436,8 @@
- name: build rust crates - name: build rust crates
shell: | shell: |
set -o errexit
. ~/.cargo/env
cargo install --version {{ item.version }} {{ item.crate }} cargo install --version {{ item.version }} {{ item.crate }}
mv /var/lib/rust_build/.cargo/bin/{{ item. binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }} mv /var/lib/rust_build/.cargo/bin/{{ item. binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
args: args:

View File

@@ -365,6 +365,14 @@
tags: [update] tags: [update]
tags: [vim-plugins] tags: [vim-plugins]
- block:
- name: install rustup on ubuntu
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
args:
creates: ~/.cargo/bin/rustup
when: distro == 'ubuntu'
tags: [rust]
- block: - block:
- name: create firefox directories - name: create firefox directories
firefox_profile: firefox_profile:

View File

@@ -3,6 +3,7 @@ source /etc/profile
_path=( _path=(
"$HOME/bin" "$HOME/bin"
"$HOME/.optbin" "$HOME/.optbin"
"$HOME/.cargo/bin"
) )
for part in ${_path[@]} ; do for part in ${_path[@]} ; do