Set DOTNET_ROOT dynamically
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 25 Sep 2020 15:49:50 +0000 (11:49 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 25 Sep 2020 15:49:50 +0000 (11:49 -0400)
home/lib/login_variables.sh

index 2898644..0631cbe 100644 (file)
@@ -14,7 +14,10 @@ export NQDIR="$HOME/var/run/nq"
 mkdir -p "$NQDIR"
 
 # .Net Core
-export DOTNET_ROOT=$HOME/.dotnet
+DOTNET_ROOT_path=$(which dotnet)
+DOTNET_ROOT_realpath=$(realpath "$DOTNET_ROOT_path")
+DOTNET_ROOT_dirname=$(dirname "$DOTNET_ROOT_realpath")
+export DOTNET_ROOT="$DOTNET_ROOT_dirname"
 export PATH=$PATH:$HOME/.dotnet
 
 # Rust / cargo
This page took 0.042282 seconds and 4 git commands to generate.