01-rust.sh 256 B

12345678910111213
  1. #!/bin/bash
  2. set -e
  3. if command -v rustup &>/dev/null || [ -f "$HOME/.cargo/env" ]; then
  4. rustup update
  5. else
  6. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup.sh
  7. sh /tmp/rustup.sh -y
  8. rm /tmp/rustup.sh
  9. fi
  10. . "$HOME/.cargo/env"