<commit_before>#!/bin/env bash

# This is the script that installs the required dependencies and runs the final setups on the system

set -x
set -e

: ${OPENSSL_DIR:=/build/openssl}
: ${OPENSSL_SRC:=$OPENSSL_DIR/openssl_src}

# Determine the fastest host to use for updating
apt-get install --allow-unauthenticated --qq netstat-apt
netselect-apt
NEW_HOST=$(cat sources.list | grep deb | head -n 1 | sed 's/deb http:\/\///' | sed 's/\/debian\/ stable.*//')
rm sources.list

# Replace the old host in the soruces lists with the new ideal host
SOURCE_FILES=/etc/apt/sources.list.d/*.list
echo "Source Files: $SOURCE_FILES"
for f in $SOURCE_FILES
do
  echo "Updating: $f"
  UPDATED=$(cat $f | sed "s/ftp.us.debian.org/$NEW_HOST/")
  echo "$UPDATED" > $f
done

apt-get update -qq
apt-get install --allow-unauthenticated -qq openssl zlib1g-dev git curl python ccache clang/testing gcc g++ cmake file build-essential pkg-config

# Run the dropbox uploader configuration script
cd ~
bash dropbox_uploader.sh

# Build OpenSSL with the required information for use in building cargo
cd $OPENSSL_SRC
./config -fPIC shared --prefix=$OPENSSL_DIR/dist
make
make install<commit_msg>Working on setting clang and clang++ as the default in the build container<commit_after>#!/bin/env bash

# This is the script that installs the required dependencies and runs the final setups on the system

set -x
set -e

: ${OPENSSL_DIR:=/build/openssl}
: ${OPENSSL_SRC:=$OPENSSL_DIR/openssl_src}

# Determine the fastest host to use for updating
apt-get install --allow-unauthenticated --qq netstat-apt
netselect-apt
NEW_HOST=$(cat sources.list | grep deb | head -n 1 | sed 's/deb http:\/\///' | sed 's/\/debian\/ stable.*//')
rm sources.list

# Replace the old host in the soruces lists with the new ideal host
SOURCE_FILES=/etc/apt/sources.list.d/*.list
echo "Source Files: $SOURCE_FILES"
for f in $SOURCE_FILES
do
  echo "Updating: $f"
  UPDATED=$(cat $f | sed "s/ftp.us.debian.org/$NEW_HOST/")
  echo "$UPDATED" > $f
done

apt-get update -qq
apt-get install --allow-unauthenticated -qq openssl zlib1g-dev git curl python ccache clang/testing gcc g++ cmake file build-essential pkg-config

# Configure the correct alternatives on the system to ensure we're using clang and clang++ 
# where we should instead of gcc and g++
update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang --slave /usr/bin/g++ g++ /usr/bin/clang++

# Run the dropbox uploader configuration script
cd ~
bash dropbox_uploader.sh

# Build OpenSSL with the required information for use in building cargo
cd $OPENSSL_SRC
./config -fPIC shared --prefix=$OPENSSL_DIR/dist
make
make install
{'fraction_non_alphanumeric': 0.112419293581466, 'fraction_numerical': 0.0015191796429927839, 'mean_word_length': 4.0556621880998085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6794682', 'n_tokens_mistral': 897, 'n_tokens_neox': 845, 'n_words': 316}