Skip to content

Instantly share code, notes, and snippets.

@ctacke
Last active March 21, 2024 15:30
Show Gist options
  • Save ctacke/0c1e0990aef1ac46fb1aceb41bd4473d to your computer and use it in GitHub Desktop.
Save ctacke/0c1e0990aef1ac46fb1aceb41bd4473d to your computer and use it in GitHub Desktop.
Installing .NET on Raspberry Pi
#!/bin/bash
add_to_bashrc() {
local string="$1"
if ! grep -q "$string" "$HOME/.bashrc"; then
echo "$string" >> $HOME/.bashrc
fi
}
wget --inet4-only https://dot.net/v1/dotnet-install.sh -O - | bash /dev/stdin --version latest
add_to_bashrc "export DOTNET_ROOT=\$HOME/.dotnet"
add_to_bashrc "export PATH=\$PATH:\$HOME/.dotnet"
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment