build_support_linux.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. ##############################################################################
  3. # Linux support functions
  4. ##############################################################################
  5. #
  6. # This script file can be included in build scripts for Linux.
  7. #
  8. ##############################################################################
  9. # Setup build environment
  10. CI_LINUX_CEF_VERSION=$(cat "${CI_WORKFLOW}" | sed -En "s/[ ]+CEF_BUILD_VERSION_LINUX: '([0-9]+)'/\1/p")
  11. if [ "${TERM-}" -a -z "${CI}" ]; then
  12. COLOR_RED=$(tput setaf 1)
  13. COLOR_GREEN=$(tput setaf 2)
  14. COLOR_BLUE=$(tput setaf 4)
  15. COLOR_ORANGE=$(tput setaf 3)
  16. COLOR_RESET=$(tput sgr0)
  17. else
  18. COLOR_RED=""
  19. COLOR_GREEN=""
  20. COLOR_BLUE=""
  21. COLOR_ORANGE=""
  22. COLOR_RESET=""
  23. fi
  24. if [ "${CI}" -o "${QUIET}" ]; then
  25. export CURLCMD="curl --silent --show-error --location -O"
  26. else
  27. export CURLCMD="curl --progress-bar --location --continue-at - -O"
  28. fi
  29. _add_ccache_to_path() {
  30. if [ "${CMAKE_CCACHE_OPTIONS}" ]; then
  31. PATH="/usr/local/opt/ccache/libexec:${PATH}"
  32. status "Compiler Info:"
  33. local IFS=$'\n'
  34. for COMPILER_INFO in $(type cc c++ gcc g++ clang clang++ || true); do
  35. info "${COMPILER_INFO}"
  36. done
  37. fi
  38. }