fix dwarf-based unwinding to the end of stack
[platform/upstream/coreclr.git] / sync.sh
1 #!/usr/bin/env bash
2
3 usage()
4 {
5     echo "Usage: sync [-p]"
6     echo "Repository syncing script."
7     echo "  -p         Restore all NuGet packages for the repository"
8     echo "If no option is specified, then \"sync.sh -p\" is implied."
9     exit 1
10 }
11
12 working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
13 unprocessedBuildArgs=
14
15 # Parse arguments
16 # Assume the default '-p' argument if the only arguments specified are specified after double dash.
17 # Only position parameters can be specified after the double dash.
18 if [ $# == 0 ] || [ "$1" == "--" ]; then
19     buildArgs="./build.proj /p:RestoreDuringBuild=true /t:Sync"
20     if [ "$1" == "--" ]; then
21         shift
22     fi
23 fi
24
25 while [[ $# -gt 0 ]]
26 do
27     opt="$1"
28     case $opt in
29         -h|--help)
30         usage
31         ;;
32         -p)
33             buildArgs="./build.proj /p:RestoreDuringBuild=true /t:Sync"
34         ;;
35         *)
36         unprocessedBuildArgs="$unprocessedBuildArgs $1"
37     esac
38     shift
39 done
40
41 $working_tree_root/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary /flp:v=detailed\;LogFile=sync.log $buildArgs $unprocessedBuildArgs
42 if [ $? -ne 0 ]
43 then
44     echo "ERROR: An error occurred while syncing packages; See $working_tree_root/sync.log for more details. There may have been networking problems, so please try again in a few minutes."
45     exit 1
46 fi
47
48 echo "Sync completed successfully."
49 exit 0