diff --git a/.gitignore b/.gitignore index 5c5ee10..a79fa40 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.vsp *.xml .dotnet +.nuget ._.DS_Store .DS_Store .idea diff --git a/build.sh b/build.sh index 60c6556..1f413dc 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,13 @@ -export NUGET_PACKAGES=.nuget -export NUGET_HTTP_CACHE_PATH=.nuget +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +REPOROOT="$DIR" +export NUGET_PACKAGES=$REPOROOT/.nuget +export NUGET_HTTP_CACHE_PATH=$REPOROOT/.nuget export DOTNET_INSTALL_DIR=.dotnet export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 mkdir $DOTNET_INSTALL_DIR