<commit_before>#!/bin/bash

config_file='config.js'
cron_file='cron'
main_file='cate-monitor'
log_file='log.txt'

echo -e "\033[31m====================================================="
echo -e         "| Bootstraping cate-monitor..."
echo -e         "=====================================================\033[0m"

# Installing dependencies
echo
echo    "Installing dependencies..."

which brew >/dev/null 2>&1
[[ $? -ne 0 ]] && echo "Please install Homebrew from http://brew.sh/" && exit 1

brew install terminal-notifier
brew install phantomjs

# Prompt data
echo
echo    "Creating the configuration file..."

echo -n "Computing year [1/2/3]: "
read year

echo -n "Cate username:          "
read username

echo -n "Cate password:          "
read password

# Creating config file
rm -f $config_file

echo "var config = {"           >> $config_file
echo "  year:  '"$year"',"      >> $config_file
echo "  user:  '"$username"',"  >> $config_file
echo "  passw: '"<PASSWORD>"',"  >> $config_file
echo "  cwd:   '"`pwd`"'"       >> $config_file
echo "};"                       >> $config_file

chmod 600 $config_file  # rw------- config_file

# Adding to crontab
echo
echo    "Adding as a cronjob and let it run each minute."
echo    "Check \`man crontab\` for more information."

rm -f $cron_file
if [[ -n `crontab -l | grep MAILTO` ]]; then # Disable automatic emails
  echo 'MAILTO=""' > $cron_file
fi

crontab -l > $cron_file
echo "* * * * *  "`pwd`"/$main_file >"`pwd`"/$log_file 2>&1" >> $cron_file
crontab $cron_file
rm $cron_file

# Done

echo
echo -e "\033[31m[DONE]\033[0m"
<commit_msg>Fixed space escaping and wrong condition in bootstrap.sh<commit_after>#!/bin/bash

config_file='config.js'
cron_file='cron'
main_file='cate-monitor'
log_file='log.txt'

echo -e "\033[31m====================================================="
echo -e         "| Bootstraping cate-monitor..."
echo -e         "=====================================================\033[0m"

# Installing dependencies
echo
echo    "Installing dependencies..."

which brew >/dev/null 2>&1
[[ $? -ne 0 ]] && echo "Please install Homebrew from http://brew.sh/" && exit 1

brew install terminal-notifier
brew install phantomjs

# Prompt data
echo
echo    "Creating the configuration file..."

echo -n "Computing year [1/2/3]: "
read year

echo -n "Cate username:          "
read username

echo -n "Cate password:          "
read password

# Creating config file
rm -f $config_file

echo "var config = {"           >> $config_file
echo "  year:  '"$year"',"      >> $config_file
echo "  user:  '"$username"',"  >> $config_file
echo "  passw: '"<PASSWORD>"',"  >> $config_file
echo "  cwd:   '"`pwd`"'"       >> $config_file
echo "};"                       >> $config_file

chmod 600 $config_file  # rw------- config_file

# Adding to crontab
echo
echo    "Adding as a cronjob and let it run each minute."
echo    "Check \`man crontab\` for more information."

rm -f $cron_file
if [[ -z `crontab -l | grep MAILTO` ]]; then # Disable automatic emails
  echo 'MAILTO=""' > $cron_file
fi

crontab -l > $cron_file
echo "* * * * *  "\"`pwd`"/$main_file\" >"\"`pwd`"/$log_file\" 2>&1" >> $cron_file
crontab $cron_file
rm $cron_file

# Done

echo
echo -e "\033[31m[DONE]\033[0m"

{'fraction_non_alphanumeric': 0.2153228297806611, 'fraction_numerical': 0.018535681186283594, 'mean_word_length': 3.2887417218543047, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, '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': '1114202', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1103, 'n_words': 321}