#!/bin/bash

MOD="$1"

if [ "$MOD" = "rust" ]; then
	curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust_install.sh
	chmod 777 rust_install.sh
	./rust_install.sh -y --default-toolchain nightly
	rm rust_install.sh

	apt update
	apt install -y build-essential pkg-config libssl-dev
	code-server --install-extension rust-lang.rust-analyzer
	exit
fi