diff --git a/tools/setup_dependencies.sh b/tools/setup_dependencies.sh index 3fb7165a50..8d85001d31 100755 --- a/tools/setup_dependencies.sh +++ b/tools/setup_dependencies.sh @@ -30,8 +30,19 @@ function install_linux_deps() { SUDO="sudo" fi + local missing_linux_deps=0 + for cmd in gcc g++ make curl curl-config git; do + if ! command -v "$cmd" > /dev/null 2>&1; then + missing_linux_deps=1 + break + fi + done + # normal stuff, this mostly for bare docker images - if command -v apt-get > /dev/null 2>&1; then + if [[ "$missing_linux_deps" -eq 0 ]]; then + # the native package managers are slow, so skip if we canNM_CONNECTIONS_DIRS + echo "[ ] system packages already installed t=$SECONDS" + elif command -v apt-get > /dev/null 2>&1; then $SUDO apt-get update $SUDO apt-get install -y --no-install-recommends ca-certificates build-essential curl libcurl4-openssl-dev locales git elif command -v dnf > /dev/null 2>&1; then