2015-11-17 14:06:42 -08:00
#!/usr/bin/env bash
2015-12-28 11:47:21 -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-17 14:06:42 -08:00
2015-12-28 11:47:21 -08:00
set -e
2015-11-17 14:06:42 -08:00
2015-12-28 11:47:21 -08:00
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 ) "
2015-11-17 23:42:27 -08:00
2015-12-28 11:47:21 -08:00
source " $DIR /../common/_common.sh "
2015-11-17 23:42:27 -08:00
2016-02-02 17:04:58 -08:00
# Always recalculate the RID because the package always uses a specific RID, regardless of OS X version or Linux distro.
if [ " $OSNAME " = = "osx" ] ; then
RID = osx.10.10-x64
elif [ " $OSNAME " = = "ubuntu" ] ; then
RID = ubuntu.14.04-x64
elif [ " $OSNAME " = = "centos" ] ; then
RID = centos.7.1-x64
else
echo " Unknown OS: $OSNAME " 1>& 2
exit 1
fi
2015-11-17 14:06:42 -08:00
# Get Absolute Output Dir
pushd $1
OUTPUT_DIR = " $( pwd ) "
popd
## App Deps ##
2016-02-03 12:10:17 -08:00
APPDEP_SDK = $NUGET_PACKAGES /toolchain.$RID .Microsoft.DotNet.AppDep/1.0.5-prerelease-00001/
2015-11-17 14:06:42 -08:00
mkdir -p $OUTPUT_DIR /appdepsdk
2016-01-12 16:36:31 -08:00
cp -a $APPDEP_SDK /. $OUTPUT_DIR /appdepsdk