<commit_before>#!/bin/bash
# Set up nix toolchain; run bootstrap
set -e

# make sure there is nix
if ! type nix-env; then
	bash <(curl https://nixos.org/nix/install)
	
	# re-source files as opposed to running nix.sh
	#+	because on macOS it's nix-daemon.sh or some such
	#+	and I still have no clue what I'm doing with Nix :P
	re_source="/etc/bashrc $HOME/.bashrc $HOME/.bash_profile"
	for f in $re_source; do
		if [[ -e "$f" ]]; then source "$f"; fi
	done

fi

nix-shell --pure --run "./bootstrap.sh"
<commit_msg>simplify sourcing<commit_after>#!/bin/bash
# Set up nix toolchain; run bootstrap
set -e

# make sure there is nix
if ! type nix-env; then
	bash <(curl https://nixos.org/nix/install)

	# don't bother re-sourcing blah blah (it's different on macOS);
	#+	just fire a new shell, wherein we expect nix to work.
	bash -l -c 'nix-shell --pure --run "./bootstrap.sh"'
else
	nix-shell --pure --run "./bootstrap.sh"
fi

{'fraction_non_alphanumeric': 0.1399132321041215, 'fraction_numerical': 0.0, 'mean_word_length': 3.2731481481481484, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '758016', 'n_tokens_mistral': 374, 'n_tokens_neox': 336, 'n_words': 124}