Last active
March 21, 2024 15:30
-
-
Save ctacke/0c1e0990aef1ac46fb1aceb41bd4473d to your computer and use it in GitHub Desktop.
Installing .NET on Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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