-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure
executable file
·67 lines (57 loc) · 1.25 KB
/
configure
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
function show_help {
echo "$0 [--release] [--default-platform <platform>] [--supported-platforms <platforms (space separated list as a string)>]"
echo ""
}
function error {
echo "Configure failed! Fix errors and run again."
echo ""
rm -f .graphite_config
show_help
exit
}
## Now do some parsing, look for options
DEFAULT_PLATFORM="basalt"
SUPPORTED_PLATFORMS="basalt"
BUILD="debug"
while :; do
case $1 in
-h|--help)
show_help
exit
;;
--release)
BUILD="release"
shift
;;
--default-platform)
shift
DEFAULT_PLATFORM="$1"
shift
;;
--supported-platforms)
shift
SUPPORTED_PLATFORMS="$1"
shift
;;
-?*)
echo "ERROR: unknown option $1"
error
exit
;;
*)
break
esac
done
echo ""
echo "The default platform is $DEFAULT_PLATFORM and builds for '$SUPPORTED_PLATFORMS' are supported."
echo "This is a $BUILD build."
rm -f .graphite_config
## Write options to config file
echo "DEFAULT_PLATFORM=\"$DEFAULT_PLATFORM\"" >> .graphite_config
echo "SUPPORTED_PLATFORMS=\"$SUPPORTED_PLATFORMS\"" >> .graphite_config
echo "BUILD=\"$BUILD\"" >> .graphite_config
## All done!
echo ""
echo "You're all set to run make!"
echo ""