run.sh 402 B

12345678910111213
  1. #!/usr/bin/env bash
  2. #Cause the script to exit if a single command fails.
  3. set -e
  4. ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE:-$0}")" || exit; pwd)"
  5. bazel --nosystem_rc --nohome_rc build //:example
  6. if [[ "$OSTYPE" == "darwin"* ]]; then
  7. DYLD_LIBRARY_PATH="$ROOT_DIR/thirdparty/lib" "${ROOT_DIR}"/bazel-bin/example
  8. else
  9. LD_LIBRARY_PATH="$ROOT_DIR/thirdparty/lib" "${ROOT_DIR}"/bazel-bin/example
  10. fi