<commit_before>#!/bin/bash
set -euo pipefail

function on_error {
    echo -e "\n-- Dependencies NOT installed.\n"
    sleep 3
    exit 1
}
trap on_error ERR

command -v conan >/dev/null 2>&1 || 
{ 
    echo -e "-- CONAN PACKAGE MANAGER is used to install dependencies\n - Please install with 'pip install conan'" 1>&2
    on_error
}

CONFIG="${1:-Release}"
ARCH="${2:-x86_64}"

REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$($REPO_ROOT/scripts/get-reponame.sh 2>&1)

OS="$($REPO_ROOT/scripts/get-os.sh 2>&1 >/dev/null)"
PROFILE="$($REPO_ROOT/conan/determine-profile.sh 2>&1 >/dev/null)"
BUILD_DIR="$REPO_ROOT/build"

SERVER_NAME="${REPO_NAME}_conan-server"

echo -e "\n-- Installing dependencies for '$CONFIG $ARCH' with profile '$PROFILE'..."

# Add conan-public as remotes. Needed until more packages are available in the official repository.
# Fails if already added. If so, just swollow error.
conan remote add --insert 0 conan-public https://api.bintray.com/conan/bincrafters/public-conan >/dev/null 2>&1 || true

# Add private repository (only if reachable)
if ping -w 1 -c 1 $SERVER_NAME >/dev/null 2>&1; then
    conan remote add --insert 0 docker http://$SERVER_NAME:9300 >/dev/null 2>&1 || true<commit_msg>Added missing personal remove (containing cucumber-cpp etc.)<commit_after>#!/bin/bash
set -euo pipefail

function on_error {
    echo -e "\n-- Dependencies NOT installed.\n"
    sleep 3
    exit 1
}
trap on_error ERR

command -v conan >/dev/null 2>&1 || 
{ 
    echo -e "-- CONAN PACKAGE MANAGER is used to install dependencies\n - Please install with 'pip install conan'" 1>&2
    on_error
}

CONFIG="${1:-Release}"
ARCH="${2:-x86_64}"

REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$($REPO_ROOT/scripts/get-reponame.sh 2>&1)

OS="$($REPO_ROOT/scripts/get-os.sh 2>&1 >/dev/null)"
PROFILE="$($REPO_ROOT/conan/determine-profile.sh 2>&1 >/dev/null)"
BUILD_DIR="$REPO_ROOT/build"

SERVER_NAME="${REPO_NAME}_conan-server"

echo -e "\n-- Installing dependencies for '$CONFIG $ARCH' with profile '$PROFILE'..."

# Add bincrafters remote
conan remote add --insert 0 bincrafters https://api.bintray.com/conan/bincrafters/public-conan >/dev/null 2>&1 || true
# Add personal remote
conan remote add --insert 0 helmesjo https://api.bintray.com/conan/helmesjo/public >/dev/null 2>&1 || true

# Add private repository (only if reachable)
if ping -w 1 -c 1 $SERVER_NAME >/dev/null 2>&1; then
    conan remote add --insert 0 docker http://$SERVER_NAME:9300 >/dev/null 2>&1 || true
{'fraction_non_alphanumeric': 0.1553864637565078, 'fraction_numerical': 0.02683219863836604, 'mean_word_length': 3.9367588932806323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2339941', 'n_tokens_mistral': 953, 'n_tokens_neox': 896, 'n_words': 252}