forked from dotnet/icu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·45 lines (37 loc) · 1 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/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
usage()
{
echo "Common settings:"
echo " --tracing Enable ICU tracing"
echo " --help Print help and exit (short: -h)"
echo ""
}
inner_args=
properties=
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
case "$opt" in
-help|-h)
usage
exit 0
;;
-tracing)
properties="$properties /p:IcuTracing=true"
;;
*)
inner_args="$inner_args $1"
;;
esac
shift
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/common/build.sh" --build --restore $inner_args $properties