Last active
June 15, 2022 15:51
-
-
Save Aldaviva/9dd91396b64312639ee9688a378a0191 to your computer and use it in GitHub Desktop.
Install the ASP.NET Core runtime machine-wide on a Raspberry Pi, where packages are unavailable and you normally have to fuck around with arguments and symlinks
This file contains 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/sh | |
SCRIPT_FILE=/root/dotnet-install.sh | |
INSTALLATION_DIR=/usr/share/dotnet | |
sudo rm -f $SCRIPT_FILE | |
echo Downloading installation script | |
sudo wget -q https://dot.net/v1/dotnet-install.sh -O $SCRIPT_FILE | |
sudo chmod o+x $SCRIPT_FILE | |
echo | |
sudo $SCRIPT_FILE --version latest --runtime aspnetcore --install-dir $INSTALLATION_DIR --no-path | |
sudo ln -f -s $INSTALLATION_DIR/dotnet /usr/bin/dotnet | |
echo | |
dotnet --list-runtimes | |
sudo rm $SCRIPT_FILE | |
echo | |
echo Done, you may want to delete old versions from $INSTALLATION_DIR/host/fxr/ and $INSTALLATION_DIR/shared/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment