<commit_before>#!/bin/bash

PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
PRELUDE_URL=https://github.com/bbatsov/prelude.git

echo -n "Checking to see if git is installed... "
hash git 2>&- || { echo >&2 "not found. Aborting installation!"; exit 1; }
echo "found"

echo -n "Checking to see if aspell is installed... "
hash aspell 2>&- || { echo >&2 "not found. Install aspell to benefit from flyspell-mode!"; }
echo "found"

echo -n "Checking to see if ack is installed... "
hash ack 2>&- || { echo >&2 "not found. You'll need it to use ack-and-a-half!"; }
echo "found"

echo -n "Looking for an existing Emacs config..."
if [ -d $PRELUDE_INSTALL_DIR ]
then
  echo "Found an existing $PRELUDE_INSTALL_DIR. Backing it up to $PRELUDE_INSTALL_DIR.pre-prelude"
  mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude
fi

if [ -f ~/.emacs ]
then
  echo "Found an existing ~/.emacs. Backing it up to ~/.emacs.pre-prelude"
  mv ~/.emacs ~/.emacs.pre-prelude
fi

echo -n "Cloning Emacs Prelude from GitHub... "
/usr/bin/env git clone $PRELUDE_URL $PRELUDE_INSTALL_DIR > /dev/null
cd $PRELUDE_INSTALL_DIR
echo "done."

echo -e '\e[34m ____           _           _      '
echo -e '\e[34m|  _ \ _ __ ___| |_   _  __| | ___ '
echo -e '\e[34m| |_) |  __/ _ \ | | | |/ _  |/ _ \'
echo -e '\e[34m|  __/| | |  __/ | |_| | (_| |  __/'
echo -e '\e[34m|_|   |_|  \___|_|\__,_|\__,_|\___|'


echo -e '\e[32m... is now installed and ready to do thy bidding!'
echo -e '\e[0m'<commit_msg>fixed #149 - corrected output from the installer script<commit_after>PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
PRELUDE_URL=https://github.com/bbatsov/prelude.git

if [ -d $PRELUDE_INSTALL_DIR ]
then
    printf "\e[33m You already have Prelude installed.\e[0m You'll need to remove $PRELUDE_INSTALL_DIR if you want to install Prelude again.\n"
    exit 1;
fi

printf "Checking to see if git is installed... "
hash git 2>&- || { printf >&2 "\e[33mnot found. Aborting installation!\e[0m"; exit 1; }
printf "\e[32mfound.\e[0m\n"

printf "Checking to see if aspell is installed... "
hash aspell 2>&- || { printf >&2 "\e[33mnot found. Install aspell to benefit from flyspell-mode!\e[0m"; }
printf "\e[32mfound.\e[0m\n"

printf "Checking to see if ack is installed... "
hash ack 2>&- || { printf >&2 "\e[33mnot found. You'll need it to use ack-and-a-half!\e[0m"; }
printf "\e[32mfound.\e[0m\n"

printf "Looking for an existing Emacs config... "
if [ -d $PRELUDE_INSTALL_DIR ]
then
    printf "\e[33mfound an existing $PRELUDE_INSTALL_DIR.\e[0m Backing it up to $PRELUDE_INSTALL_DIR.pre-prelude.\n"
    mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude
elif [ -f ~/.emacs ]
then
    printf "\e[33mfound an existing ~/.emacs.\e[0m Backing it up to ~/.emacs.pre-prelude.\n"
    mv ~/.emacs ~/.emacs.pre-prelude
else
    printf "\e[32mnot found.\e[0m\n"
fi

printf "Cloning Emacs Prelude from GitHub... "
/usr/bin/env git clone $PRELUDE_URL $PRELUDE_INSTALL_DIR > /dev/null 2>&1
cd $PRELUDE_INSTALL_DIR
printf "done.\n\n"

printf "\e[34m ____           _           _       \n"
printf "\e[34m|  _ \ _ __ ___| |_   _  __| | ___  \n"
printf "\e[34m| |_) |  __/ _ \ | | | |/ _  |/ _ \ \n"
printf "\e[34m|  __/| | |  __/ | |_| | (_| |  __/ \n"
printf "\e[34m|_|   |_|  \___|_|\__,_|\__,_|\___| \n"

printf "\e[32m... is now installed and ready to do thy bidding, Master $USER!\n"
printf "\e[0m"
{'fraction_non_alphanumeric': 0.1665668064709407, 'fraction_numerical': 0.022768124625524265, 'mean_word_length': 2.998802395209581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '5480324', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1334, 'n_words': 358}