dotnet-installer/eng/common/msbuild.sh

59 lines
1.1 KiB
Bash
Raw Normal View History

2018-10-22 05:07:26 +00:00
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
verbosity='minimal'
2018-12-19 20:55:42 +00:00
warn_as_error=true
node_reuse=true
2018-10-22 05:07:26 +00:00
prepare_machine=false
2018-12-19 20:55:42 +00:00
extra_args=''
2018-10-22 05:07:26 +00:00
while (($# > 0)); do
lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
2018-10-22 05:07:26 +00:00
case $lowerI in
--verbosity)
verbosity=$2
shift 2
;;
--warnaserror)
2018-12-19 20:55:42 +00:00
warn_as_error=$2
2018-10-22 05:07:26 +00:00
shift 2
;;
--nodereuse)
2018-12-19 20:55:42 +00:00
node_reuse=$2
2018-10-22 05:07:26 +00:00
shift 2
;;
--ci)
ci=true
shift 1
;;
--preparemachine)
prepare_machine=true
shift 1
;;
*)
2018-12-19 20:55:42 +00:00
extra_args="$extra_args $1"
2018-10-22 05:07:26 +00:00
shift 1
;;
esac
done
. "$scriptroot/tools.sh"
2018-12-19 20:55:42 +00:00
if [[ "$ci" == true ]]; then
node_reuse=false
fi
MSBuild $extra_args
ExitWithExitCode 0