wrote first version for setup rustup

This commit is contained in:
puckoprutt 2026-07-06 10:47:20 +02:00
commit dc92acbcd3

24
rustup.sh Normal file
View File

@ -0,0 +1,24 @@
function check_rustup {
if type rustup >/dev/null; then
rustup --version
echo "rustup is installed!"
return 0
else
echo "rustup not found"
echo "starting to install rustup.."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
return 4
fi
}
check_rustup
echo "updateing rustup.."
rustup update
echo "installing llvm-tools.."
rustup component add llvm-tools
rustup component add rustfmt
#rustup target add thumbv6m-none-eabi # Cortex-M0 and Cortex-M0+
#rustup target add thumbv7m-none-eabi # Cortex-M3
#rustup target add thumbv7em-none-eabi # Cortex-M4 and Cortex-M7 (no FPU)
#rustup target add thumbv7em-none-eabihf # Cortex-M4F and Cortex-M7F (with FPU)