2017-04-10 11:41:01 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo "There are new changes on how we build. Use this script only for generic"
|
|
|
|
echo "build instructions that apply for both build native and build managed."
|
|
|
|
echo "Otherwise:"
|
|
|
|
echo
|
|
|
|
echo "Before Now"
|
|
|
|
echo "build.sh native build-native.sh"
|
|
|
|
echo "build.sh managed build-managed.sh"
|
|
|
|
echo
|
|
|
|
echo "For more information: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md"
|
|
|
|
echo "----------------------------------------------------------------------------"
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2018-01-24 17:04:36 +00:00
|
|
|
if [ "$1" == "-?" ] || [ "$1" == "-h" ]; then
|
2017-04-10 11:41:01 +00:00
|
|
|
usage
|
2018-01-24 17:04:36 +00:00
|
|
|
if [ "$1" == "-h" ]; then
|
|
|
|
set -- "-?"
|
|
|
|
fi
|
2017-04-10 11:41:01 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
2017-10-19 20:04:20 +00:00
|
|
|
__workingDir=$(pwd -P)
|
|
|
|
|
2018-01-24 17:04:36 +00:00
|
|
|
if [ "$1" != "" ] && [[ "$1" != -* ]]; then
|
2017-10-19 20:04:20 +00:00
|
|
|
if [ -d $__workingDir/$1 ]; then
|
|
|
|
$__scriptpath/run.sh build-directory -directory:$__workingDir/$*
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
if [ -d $__scriptpath/src/$1 ]; then
|
|
|
|
$__scriptpath/run.sh build-directory -directory:$__scriptpath/$*
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
fi
|
2017-04-10 11:41:01 +00:00
|
|
|
|
2018-01-29 19:03:06 +00:00
|
|
|
"$__scriptpath/build-native.sh" "$@"
|
2017-04-10 11:41:01 +00:00
|
|
|
if [ $? -ne 0 ];then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-01-29 19:03:06 +00:00
|
|
|
"$__scriptpath/build-managed.sh" -BuildPackages=true "$@"
|
2017-04-10 11:41:01 +00:00
|
|
|
exit $?
|