-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
install_prereqs.sh
executable file
·52 lines (43 loc) · 1.75 KB
/
install_prereqs.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
46
47
48
49
50
51
52
#!/bin/bash
#
# Install development and runtime prerequisites for both binary and source
# distributions of Drake on macOS.
set -euxo pipefail
binary_distribution_args=()
source_distribution_args=()
while [ "${1:-}" != "" ]; do
case "$1" in
# Install prerequisites that are only needed to run select maintainer
# scripts. Most developers will not need to install these dependencies.
--with-maintainer-only)
source_distribution_args+=(--with-maintainer-only)
;;
# Do NOT install prerequisites that are only needed to build and/or run
# unit tests, i.e., those prerequisites that are not dependencies of
# bazel { build, run } //:install.
--without-test-only)
source_distribution_args+=(--without-test-only)
;;
# Do NOT call brew update during execution of this script.
--without-update)
binary_distribution_args+=(--without-update)
source_distribution_args+=(--without-update)
;;
*)
echo 'Invalid command line argument' >&2
exit 1
esac
shift
done
# Dependencies that are installed by the following sourced script that are
# needed when developing with binary distributions are also needed when
# developing with source distributions.
source "${BASH_SOURCE%/*}/binary_distribution/install_prereqs.sh" \
"${binary_distribution_args[@]:-}"
# The following additional dependencies are only needed when developing with
# source distributions.
source "${BASH_SOURCE%/*}/source_distribution/install_prereqs.sh" \
"${source_distribution_args[@]:-}"
# The preceding only needs to be run once per machine. The following sourced
# script should be run once per user who develops with source distributions.
source "${BASH_SOURCE%/*}/source_distribution/install_prereqs_user_environment.sh"