1#!/bin/bash 2# Copyright (c) Meta Platforms, Inc. and affiliates. 3# All rights reserved. 4# 5# This source code is licensed under the BSD-style license found in the 6# LICENSE file in the root directory of this source tree. 7 8# Before doing anything, cd to the directory containing this script. 9cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null || /bin/true 10 11# Find the names of the python tools to use. 12if [[ -z $PYTHON_EXECUTABLE ]]; 13then 14 if [[ -z $CONDA_DEFAULT_ENV ]] || [[ $CONDA_DEFAULT_ENV == "base" ]] || [[ ! -x "$(command -v python)" ]]; 15 then 16 PYTHON_EXECUTABLE=python3 17 else 18 PYTHON_EXECUTABLE=python 19 fi 20fi 21 22$PYTHON_EXECUTABLE ./install_requirements.py "$@" 23 24# Exit with the same status as the python script. 25exit $? 26