From e86d2b332d572854e38e2f9fdd608e2e63430f0f Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 29 Oct 2024 21:22:33 -0400 Subject: [PATCH] add dotnet bashrc stuff --- bashrc.d/dotnet.bashrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bashrc.d/dotnet.bashrc diff --git a/bashrc.d/dotnet.bashrc b/bashrc.d/dotnet.bashrc new file mode 100755 index 0000000..445ac7e --- /dev/null +++ b/bashrc.d/dotnet.bashrc @@ -0,0 +1,19 @@ +# 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