<commit_before>#!/bin/bash

set -e

dir=/tmp/util.$$
trap "rm -fr $dir" 0 1 2

echo 'making unidoc...' 1>&2
./sbt unidoc >/dev/null 2>&1

echo 'cloning...' 1>&2
git clone -b gh-pages <EMAIL>:twitter/util.git $dir >/dev/null 2>&1

savedir=$(pwd)
cd $dir
rsync -a --delete "$savedir/target/scala-2.9.2/unidoc/" "docs"
git add .
echo 'pushing...!' 1>&2
git diff-index --quiet HEAD || (git commit -am"site push by $(whoami)"; git push origin gh-pages:gh-pages;)
echo 'finished!' 1>&2<commit_msg>[split] util-doc: Fix updatedocs.bash to update new util docs<commit_after>#!/bin/bash

set -e

dir=/tmp/util.$$
trap "rm -fr $dir" 0 1 2

unidoc=target/scala-2.10/unidoc/
rm -fr "$unidoc"

echo 'making unidoc...' 1>&2
./sbt unidoc >/dev/null 2>&1

echo 'cloning...' 1>&2
git clone -b gh-pages <EMAIL>@github.<EMAIL>:twitter/util.git $dir >/dev/null 2>&1

savedir=$(pwd)
cd $dir
rsync -a --delete "$savedir/$unidoc" "docs"
git add .
echo 'pushing...!' 1>&2
git diff-index --quiet HEAD || (git commit -am"site push by $(whoami)"; git push origin gh-pages:gh-pages;)
echo 'finished!' 1>&2
{'fraction_non_alphanumeric': 0.20612813370473537, 'fraction_numerical': 0.033426183844011144, 'mean_word_length': 3.5872340425531917, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 22, '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': '6765758', 'n_tokens_mistral': 479, 'n_tokens_neox': 438, 'n_words': 131}