20 lines
530 B
Plaintext
20 lines
530 B
Plaintext
|
# https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
|
||
|
|
||
|
function install_dotnet {
|
||
|
if command -v dotnet &> /dev/null; then
|
||
|
echo "dotnet is already installed."
|
||
|
return 1
|
||
|
fi
|
||
|
|
||
|
wget https://dot.net/v1/dotnet-install.sh -O ${HOME}/bin/dotnet-install.sh
|
||
|
chmod +x ${HOME}/bin/dotnet-install.sh
|
||
|
${HOME}/bin/dotnet-install.sh
|
||
|
mkdir -p ${HOME}/.dotnet/tools
|
||
|
|
||
|
rm ${HOME}/bin/dotnet-install.sh
|
||
|
}
|
||
|
|
||
|
if [ -d "${HOME}/.dotnet" ]; then
|
||
|
export PATH=${PATH}:${HOME}/.dotnet:${HOME}/.dotnet/tools
|
||
|
fi
|