<commit_before>#!/bin/sh
#
# Download and install xcode and
# then clone our git repo and
# install our development environment
# Author: johnpneumann
#
set -e
# Install xcode
xcode-select --install
# Install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install python
brew install python
# Get the users github username
read -p "What's your GitHub username: " username
if [ "$username" = "" ]; then
    echo "Need a GitHub username to continue."
    echo "Or just give it a bs name and re-run it. I don't care."
    exit 1
fi
# Make the repo dir
mkdir -p ~/repos/$username
cd ~/repos/$username
# Clone the dotfiles repo
git clone https://github.com/johnpneumann/dotfiles.git
# Make the foss repos dir
mkdir -p ~/repos/foss
cd ~/repos/foss
# Install Ansible pre-reqs
pip install paramiko PyYAML Jinja2 httplib2 six
# Clone ansible
git clone git://github.com/ansible/ansible.git --recursive
# Go home
cd
# Agree to the Xcode license
sudo xcodebuild -license<commit_msg>Clearer install process<commit_after>#!/bin/sh
#
# Download and install xcode and
# then clone our git repo and
# install our development environment
# Author: johnpneumann
#
set -e

if [ "$1" == "" ]; then
    echo "Please specify a username"
    exit 1
fi
if [ "$2" == "" ]; then
    echo "No clone directory specified"
    exit 1
fi
pushd . >/dev/null

# Agree to the Xcode license
echo "Agree to the xcode license."
sudo xcodebuild -license accept

# Install xcode command line tools
echo “Installing Command Line Tools”
xcode-select -p >/dev/null
if [ $? -ne 0 ]; then
    xcode-select --install
fi
# Install homebrew
echo “Install Homebrew”
command -v brew >/dev/null 2>&1 || { echo >&2
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}
# Install python
echo “Install python”
brew install python

# Make the repo dir
echo “Make the repo dirs”
if [ ! -d "$2/$1" ]; then
    mkdir -p "$2/$1"
fi
if [ ! -d "$2/$1/dotfiles" ]; then
    echo “Clone the dotfiles repo”
    cd "$2/$1"
    git clone https://github.com/johnpneumann/dotfiles.git
else
    echo “Update the dot files repo”
    cd "$2/$1/dotfiles"
    git fetch -ap
    git pull
fi

# Install Ansible pre-reqs
echo “Installing ansibile requirements”
pip install paramiko PyYAML Jinja2 httplib2 six
# Make the foss repos dir
echo “Making a foss dir for git repos”
if [ ! -d "$2/foss" ]; then
    mkdir -p "$2/foss"
fi
popd >/dev/null

# Clone ansible
pushd . >/dev/null
if [ ! -d "$2/foss/ansible" ]; then
    echo “Cloning ansible”
    cd "$2/foss"
    git clone git://github.com/ansible/ansible.git --recursive
else
    echo “Updating ansible”
    cd "$2/foss/ansible"
    git fetch -ap
    git pull --rebase
    git submodule update --init --recursive
fi

# Come on back
popd >/dev/null
sudo -k
echo "Finished"
{'fraction_non_alphanumeric': 0.11572282799859304, 'fraction_numerical': 0.009848751319029195, 'mean_word_length': 3.2895927601809953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '2714338', 'n_tokens_mistral': 996, 'n_tokens_neox': 951, 'n_words': 360}