<commit_before>#!/bin/bash



# Checking Linux Distro Is Ubuntu
if [ ! -f /etc/lsb-release ] && [ ! -f /etc/debian_version ]
then
	echo -e "\033[31mEasyEngine (ee) Is Made For Ubuntu And Debian Only As Of Now\e[0m"
	echo -e "\033[31mYou Are Free To Fork EasyEngine (ee): https://github.com/rtCamp/easyengine/fork\e[0m"
	exit 100
fi



# Checking Permissions
Permission=$(id -u)
if [ $Permission -ne 0 ] 
then
	echo -e "\033[31mSudo Privilege Required...\e[0m"
	echo -e "\033[31mUses:\e[0m\033[34m curl -sL rt.cx/ee | sudo bash\e[0m"
	exit 100 
fi


# Make Variables Available For Later Use
LOGDIR=/var/log/easyengine
INSTALLLOG=/var/log/easyengine/install.log


# Capture Errors
OwnError()
{
	echo -e "[ `date` ] \033[31m$@\e[0m" | tee -ai $INSTALLLOG
	exit 101
}


# Pre Checks To Avoid Later Screw Ups
# Checking Logs Directory

if [ ! -d $LOGDIR ]
then
	echo -e "\033[34mCreating EasyEngine (ee) Log Directory, Please Wait...\e[0m"
	mkdir -p $LOGDIR || OwnError "Unable To Create Log Directory $LOGDIR"
fi

# Checking Tee
if [ ! -x  /usr/bin/tee ]
then
	echo -e "\033[31mTee Command Not Found\e[0m"<commit_msg>Update APT Cache Before Installing On Fresh System<commit_after>#!/bin/bash



# Checking Linux Distro Is Ubuntu
if [ ! -f /etc/lsb-release ] && [ ! -f /etc/debian_version ]
then
	echo -e "\033[31mEasyEngine (ee) Is Made For Ubuntu And Debian Only As Of Now\e[0m"
	echo -e "\033[31mYou Are Free To Fork EasyEngine (ee): https://github.com/rtCamp/easyengine/fork\e[0m"
	exit 100
fi



# Checking Permissions
Permission=$(id -u)
if [ $Permission -ne 0 ] 
then
	echo -e "\033[31mSudo Privilege Required...\e[0m"
	echo -e "\033[31mUses:\e[0m\033[34m curl -sL rt.cx/ee | sudo bash\e[0m"
	exit 100 
fi


# Make Variables Available For Later Use
LOGDIR=/var/log/easyengine
INSTALLLOG=/var/log/easyengine/install.log


# Capture Errors
OwnError()
{
	echo -e "[ `date` ] \033[31m$@\e[0m" | tee -ai $INSTALLLOG
	exit 101
}


# Pre Checks To Avoid Later Screw Ups

# Checking Logs Directory
if [ ! -d $LOGDIR ]
then
	echo -e "\033[34mCreating EasyEngine (ee) Log Directory, Please Wait...\e[0m"
	mkdir -p $LOGDIR || OwnError "Unable To Create Log Directory $LOGDIR"
fi

# Update The APT Cache
echo -e "\033[34mUpdating APT Cache, Please Wait...\e[0m"
apt-get update &>> $INSTALLLOG || OwnError "Unable To Update APT Cache"

# Checking Tee
if [ ! -x  /usr/bin/tee ]
then
	echo -e "\033[31mTee Command Not Found\e[0m"
{'fraction_non_alphanumeric': 0.14025651634257344, 'fraction_numerical': 0.050475796441870086, 'mean_word_length': 3.4860853432282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4168532', 'n_tokens_mistral': 1073, 'n_tokens_neox': 935, 'n_words': 286}