2015-11-17 22:06:42 +00:00
#!/usr/bin/env bash
2015-12-28 19:47:21 +00: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 22:06:42 +00:00
2015-12-28 19:47:21 +00:00
set -e
2015-11-17 22:06:42 +00:00
2015-12-28 19:47:21 +00: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-18 07:42:27 +00:00
2015-12-28 19:47:21 +00:00
source " $DIR /../common/_common.sh "
2015-11-18 07:42:27 +00:00
2016-01-28 22:22:48 +00:00
APPDEPS_PROJECT_DIR = " $REPOROOT /src/dotnet-compile-native/appdep "
2015-11-17 22:06:42 +00:00
# Get Absolute Output Dir
pushd $1
OUTPUT_DIR = " $( pwd ) "
popd
## App Deps ##
pushd $APPDEPS_PROJECT_DIR
2016-01-29 19:13:07 +00:00
dotnet restore --packages $APPDEPS_PROJECT_DIR /packages $DISABLE_PARALLEL
2015-11-18 07:42:27 +00:00
APPDEP_SDK = $APPDEPS_PROJECT_DIR /packages/toolchain*/*/
2015-11-17 22:06:42 +00:00
popd
mkdir -p $OUTPUT_DIR /appdepsdk
2016-01-13 00:36:31 +00:00
cp -a $APPDEP_SDK /. $OUTPUT_DIR /appdepsdk