setup-buildtools-mac.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # Copyright The OpenTelemetry Authors
  3. # SPDX-License-Identifier: Apache-2.0
  4. set -e
  5. # TODO: it's not ideal experience, but we use have to use brew-provided deps.
  6. # Sometimes we might run into a situation where a different user takes over
  7. # control of the brew dirs. That causes the brew update to fail.
  8. # Temporarily allow the user to take over control of brew files.
  9. echo ***
  10. echo *** You may need to enter your admin password to update the brew files:
  11. echo ***
  12. which -s brew
  13. if [[ $? != 0 ]] ; then
  14. # Install Homebrew
  15. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  16. else
  17. # FIXME: do we always require the brew update??
  18. brew update
  19. fi
  20. sudo chown -R $(whoami) /usr/local/Cellar
  21. sudo chown -R $(whoami) /usr/local/Homebrew
  22. sudo chown -R $(whoami) /usr/local/var/homebrew
  23. sudo chown -R $(whoami) /usr/local/etc/bash_completion.d /usr/local/include /usr/local/lib/pkgconfig /usr/local/share/aclocal /usr/local/share/locale /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks
  24. brew install cmake
  25. brew install coreutils
  26. brew install wget
  27. brew install clang-format
  28. brew install google-benchmark
  29. brew tap nlohmann/json
  30. brew install nlohmann-json
  31. brew install abseil