<commit_before>#!/bin/bash

PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
PRELUDE_URL=git://github.com/bbatsov/emacs-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 "Looking for an existing Emacs config..."
if [ -f $PRELUDE_INSTALL_DIR ]
then
  echo "Found $PRELUDE_INSTALL_DIR. Backing up to $PRELUDE_INSTALL_DIR.pre-prelude"
  mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude
fi

if [ -f ~/.emacs ]
then
  echo "Found ~/.emacs. Backing 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
/usr/bin/env git submodule init
/usr/bin/env git submodule update
echo "done."

echo ' _____                            ____           _           _      '
echo '| ____|_ __ ___   __ _  ___ ___  |  _ \ _ __ ___| |_   _  __| | ___ '
echo '|  _| |  _   _ \ / _  |/ __/ __| | |_) |  __/ _ \ | | | |/ _  |/ _ \'
echo '| |___| | | | | | (_| | (__\__ \ |  __/| | |  __/ | |_| | (_| |  __/'
echo '|_____|_| |_| |_|\__,_|\___|___/ |_|   |_|  \___|_|\__,_|\__,_|\___|'


echo '... is now installed!'<commit_msg>fixed #117 - dir check in installer script<commit_after>#!/bin/bash

PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
PRELUDE_URL=git://github.com/bbatsov/emacs-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 "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
/usr/bin/env git submodule init
/usr/bin/env git submodule update
echo "done."

echo ' _____                            ____           _           _      '
echo '| ____|_ __ ___   __ _  ___ ___  |  _ \ _ __ ___| |_   _  __| | ___ '
echo '|  _| |  _   _ \ / _  |/ __/ __| | |_) |  __/ _ \ | | | |/ _  |/ _ \'
echo '| |___| | | | | | (_| | (__\__ \ |  __/| | |  __/ | |_| | (_| |  __/'
echo '|_____|_| |_| |_|\__,_|\___|___/ |_|   |_|  \___|_|\__,_|\__,_|\___|'


echo '... is now installed!'
{'fraction_non_alphanumeric': 0.1718931475029036, 'fraction_numerical': 0.003484320557491289, 'mean_word_length': 2.496617050067659, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3349349', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1036, 'n_words': 205}