<commit_before>#!/bin/bash
set -e

function run_scripts () {
	SCRIPTS_DIR="/scripts/$1.d"
	SCRIPT_FILES_PATTERN="^${SCRIPTS_DIR}/[0-9][0-9][a-zA-Z0-9_-]+$"
	SCRIPTS=$(find "$SCRIPTS_DIR" -type f -uid 0 -executable -regex "$SCRIPT_FILES_PATTERN" | sort)
	if [ -n "$SCRIPTS" ] ; then
		echo "=>> $1-scripts:"
	    for script in $SCRIPTS ; do
	        echo "=> $script"
			. "$script"
	    done
	fi
}

: ${APOLLO_EXT_URL:='$APOLLO_URL'}

export APOLLO_USER APOLLO_PASS ANNOTATION_GROUPS SPLIT_USERS APOLLO_MOUNTPOINT
echo -e "export APOLLO_USER=${APOLLO_USER} APOLLO_PASS=${APOLLO_PASS} ANNOTATION_GROUPS=${ANNOTATION_GROUPS} SPLIT_USERS=${SPLIT_USERS} APOLLO_MOUNTPOINT=${APOLLO_MOUNTPOINT}" >> /etc/profile
echo -e "export APOLLO_USER=${APOLLO_USER} APOLLO_PASS=${APOLLO_PASS} ANNOTATION_GROUPS=${ANNOTATION_GROUPS} SPLIT_USERS=${SPLIT_USERS} APOLLO_MOUNTPOINT=${APOLLO_MOUNTPOINT}" >> /etc/bash.bashrc

run_scripts pre-launch

exec apache2-foreground

exit 1<commit_msg>export needed vars<commit_after>#!/bin/bash
set -e

function run_scripts () {
	SCRIPTS_DIR="/scripts/$1.d"
	SCRIPT_FILES_PATTERN="^${SCRIPTS_DIR}/[0-9][0-9][a-zA-Z0-9_-]+$"
	SCRIPTS=$(find "$SCRIPTS_DIR" -type f -uid 0 -executable -regex "$SCRIPT_FILES_PATTERN" | sort)
	if [ -n "$SCRIPTS" ] ; then
		echo "=>> $1-scripts:"
	    for script in $SCRIPTS ; do
	        echo "=> $script"
			. "$script"
	    done
	fi
}

: ${APOLLO_EXT_URL:='$APOLLO_URL'}

export APOLLO_URL APOLLO_USER APOLLO_PASS ANNOTATION_GROUPS SPLIT_USERS APOLLO_MOUNTPOINT LOCAL_ONLY
echo -e "export APOLLO_URL=${APOLLO_URL} APOLLO_USER=${APOLLO_USER} APOLLO_PASS=${<PASSWORD>} ANNOTATION_GROUPS=${ANNOTATION_GROUPS} SPLIT_USERS=${SPLIT_USERS} APOLLO_MOUNTPOINT=${APOLLO_MOUNTPOINT} LOCAL_ONLY=${LOCAL_ONLY}" >> /etc/profile
echo -e "export APOLLO_URL=${APOLLO_URL} APOLLO_USER=${APOLLO_USER} APOLLO_PASS=${AP<PASSWORD>} ANNOTATION_GROUPS=${ANNOTATION_GROUPS} SPLIT_USERS=${SPLIT_USERS} APOLLO_MOUNTPOINT=${APOLLO_MOUNTPOINT} LOCAL_ONLY=${LOCAL_ONLY}" >> /etc/bash.bashrc

run_scripts pre-launch

exec apache2-foreground

exit 1
{'fraction_non_alphanumeric': 0.1528785679729076, 'fraction_numerical': 0.010643444605708756, 'mean_word_length': 6.106529209621993, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '5343777', 'n_tokens_mistral': 907, 'n_tokens_neox': 923, 'n_words': 135}