<commit_before>ME=$(whoami)

######################
## Setting stuff up ##
######################

# Since Homebrew has linux support (v2.0), this shouldn't be necessary soonish
function install_linuxbrew() {
	sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

	test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
	test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
	test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
	echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

	echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.env.local
}

function install_homebrew() {
	/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}

# Dump files to my filedump, because dump
function dump {
	rsync -avz --progress -h --partial "$@" -e ssh mercy:/srv/dump.jemu.name
	FILE=$(basename $1)
	if [[ $ME == "Lukas" ]]; then
		echo "https://dump.jemu.name/$FILE" | pbcopy
	else 
      echo "https://dump.jemu.name/$FILE"
	fi
	echo "$(date '+%Y-%m-%d %H:%M:%S'): $FILE – http://dump.jemu.name/$FILE" >> $HOME/.dumplog
	terminal-notifier -title "Filedump" -message "$FILE" -execute code $HOME/.dumplog;
}


##############
## Updating ##
##############

function update_all() {
	echo "################################"
	echo "## Updating platform packages ##"
	echo "################################"

	case $( uname -s ) in
	Linux)  
		sudo apt update
		sudo apt upgrade -y
		sudo apt autoremove
		;;
	Darwin) 
		brew upgrade
		brew cask upgrade
		mas upgrade
		;;
	FreeBSD) 
		pkg update
		pkg upgrade
		;;
	*) 
		echo "Don't know how to update on this platform: $(uname -s)"
		;;
	esac

	if (( $+commands[Rscript] )); then
		echo "#########################################"
		echo "## Updating R packages as current user ##"
		echo "#########################################"
		<commit_msg>rename upall<commit_after>ME=$(whoami)

######################
## Setting stuff up ##
######################

# Since Homebrew has linux support (v2.0), this shouldn't be necessary soonish
function install_linuxbrew() {
	sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

	test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
	test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
	test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
	echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

	echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.env.local
}

function install_homebrew() {
	/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}

# Dump files to my filedump, because dump
function dump {
	rsync -avz --progress -h --partial "$@" -e ssh mercy:/srv/dump.jemu.name
	FILE=$(basename $1)
	if [[ $ME == "Lukas" ]]; then
		echo "https://dump.jemu.name/$FILE" | pbcopy
	else 
      echo "https://dump.jemu.name/$FILE"
	fi
	echo "$(date '+%Y-%m-%d %H:%M:%S'): $FILE – http://dump.jemu.name/$FILE" >> $HOME/.dumplog
	terminal-notifier -title "Filedump" -message "$FILE" -execute code $HOME/.dumplog;
}


##############
## Updating ##
##############

function upall() {
	echo "################################"
	echo "## Updating platform packages ##"
	echo "################################"

	case $( uname -s ) in
	Linux)  
		sudo apt update
		sudo apt upgrade -y
		sudo apt autoremove
		;;
	Darwin) 
		brew upgrade
		brew cask upgrade
		mas upgrade
		;;
	FreeBSD) 
		pkg update
		pkg upgrade
		;;
	*) 
		echo "Don't know how to update on this platform: $(uname -s)"
		;;
	esac

	if (( $+commands[Rscript] )); then
		echo "#########################################"
		echo "## Updating R packages as current user ##"
		echo "#########################################"
		
{'fraction_non_alphanumeric': 0.26991374936580415, 'fraction_numerical': 0.0015220700152207, 'mean_word_length': 3.892059553349876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 8, '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': '460560', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1285, 'n_words': 339}