<commit_before>#-------------------------------------------------------------------------------
#
# install/install-bootstrap.sh
# Bootstrap script for kicking off dotfiles install on a new box.
#
# Usage: Run the following command in a terminal:
#   curl -fsSL https://raw.githubusercontent.com/phatblat/dotfiles/master/.dotfiles/install/install-bootstrap.sh | sh
#
#-------------------------------------------------------------------------------

# script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# root_dir=$(dirname ${script_dir})


# Check for existing dotfiles in user $HOME, bail if found
if [[ -d ${HOME}/.dotfiles || -d ${HOME}/.git ]]; then
  echo "Dotfiles are already installed for ${USER}@$(hostname)"
  exit 1
fi

# Clone repo to $HOME/tmp
if [[ ! -d ${HOME}/tmp ]]; then
  mkdir "${HOME}/tmp"
fi
pushd "${HOME}/tmp"
git clone https://github.com/phatblat/dotfiles.git
pushd dotfiles

# Copy Dotfiles repo into $HOME
# http://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hidden-files-and-hidden-directories-and-their-con
shopt -s dotglob
cp -Rf "./" "${HOME}"
shopt -u dotglob

# Ignore all files by default - this makes git status output quieter.
# Adding new files requires --force.
echo '*' >> ~/.git/info/exclude

# Ensure .zshrc is symlinked
# ln -s .dotfiles/_bootstrap.zsh .zshrc

# pushd ~
# Change remote URL to use SSH
# git remote set-url origin <EMAIL>@github.<EMAIL>:phatblat/dotfiles.git
# zsh

popd
popd<commit_msg>Invoke zsh at end of bootstrap<commit_after>#-------------------------------------------------------------------------------
#
# install/install-bootstrap.sh
# Bootstrap script for kicking off dotfiles install on a new box.
#
# Usage: Run the following command in a terminal:
#   curl -fsSL https://raw.githubusercontent.com/phatblat/dotfiles/master/.dotfiles/install/install-bootstrap.sh | sh
#
#-------------------------------------------------------------------------------

# Check for existing dotfiles in user $HOME, bail if found
if [[ -d ${HOME}/.dotfiles || -d ${HOME}/.git ]]; then
  echo "Dotfiles are already installed for ${USER}@$(hostname)"
  exit 1
fi

# Clone repo to $HOME/tmp
if [[ ! -d ${HOME}/tmp ]]; then
  mkdir "${HOME}/tmp"
fi
pushd "${HOME}/tmp"
git clone https://github.com/phatblat/dotfiles.git
pushd dotfiles

# Change remote URL to use SSH
git remote set-url origin <EMAIL>:phatblat/dotfiles.git

# Ignore all files by default - this makes git status output quieter.
# Adding new files requires --force.
echo '*' >> ~/.git/info/exclude

# Copy Dotfiles repo into $HOME
# http://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hidden-files-and-hidden-directories-and-their-con
shopt -s dotglob
cp -Rf "./" "${HOME}"
shopt -u dotglob

echo "Dotfiles now installed at ${HOME}"

popd
popd


# Switch to zsh and prime the shell environment
zsh
{'fraction_non_alphanumeric': 0.2386961093585699, 'fraction_numerical': 0.004556607080266386, 'mean_word_length': 2.4302884615384617, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 4, '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': '6524688', 'n_tokens_mistral': 894, 'n_tokens_neox': 865, 'n_words': 266}