2015-11-16 11:21:57 -08:00
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
2015-11-10 17:30:01 -08:00
# This script is NOT executable. It MUST be sourced!
if [ ! -z " $BASH_SOURCE " ] ; then
SOURCE = " ${ BASH_SOURCE } "
elif [ ! -z " $ZSH_VERSION " ] ; then
SOURCE = " $0 "
else
echo "Unsupported shell, this requires bash or zsh" 1>& 2
exit 1
fi
2015-10-21 15:21:14 -07:00
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 = " $( cd -P " $DIR /.. " && pwd ) "
2015-11-10 17:30:01 -08:00
UNAME = $( uname)
2015-10-21 15:21:14 -07:00
if [ -z " $RID " ] ; then
if [ " $UNAME " = = "Darwin" ] ; then
OSNAME = osx
RID = osx.10.10-x64
elif [ " $UNAME " = = "Linux" ] ; then
# Detect Distro?
OSNAME = linux
RID = ubuntu.14.04-x64
else
2015-11-10 17:30:01 -08:00
error " unknown OS: $UNAME " 1>& 2
2015-10-21 15:21:14 -07:00
exit 1
fi
fi
2015-11-10 17:30:01 -08:00
export DOTNET_TOOLS = $REPOROOT /artifacts/$RID /stage2