<commit_before>#/bin/bash

log() {
	echo "[DOTFILES] $@"
}

install() {
	log "installing dotfiles on $HOME"
	git clone -q https://git@github.com/filipenos/dotfiles "$HOME/dotfiles"
}

configure_onpath() {
	log "configure dotfiles on bashrc"
	if ! grep -q "#DOTFILESRC" $HOME/.bashrc ; then
		echo 'source $HOME/dotfiles/dotfilesrc #DOTFILESRC' >> $HOME/.bashrc
	else
		log "bashrc already configured"
	fi
	log "configure dotfiles on zshrc"
	if ! grep -q "#DOTFILESRC" $HOME/.zshrc ; then
		echo 'source $HOME/dotfiles/dotfilesrc #DOTFILESRC' >> $HOME/.zshrc
	else
		log "zshrc already configured"
	fi
	log "reload your sh shell to use dotfiles"
}

remove_frompath() {
	log "remove dotfilesrc from .bashrc"
	sed -i '/DOTFILESRC/d' "$HOME/.bashrc"
	log "remove dotfilesrc from .zshrc"
	sed -i '/DOTFILESRC/d' "$HOME/.zshrc"
}

install_vim() {
	log "configuring vimrc"
	$HOME/dotfiles/bin/vim-install-vundle
}

install_tmux() {
	log "configuring tmux.conf"
	ln -s $HOME/dotfiles/tmux.conf $HOME/.tmux.conf
}

remove() {
	log "removing dotfiles from $HOME"
	rm -rf $HOME/dotfiles
}

if [ -d "$HOME/dotfiles" ]; then
	log "dotfiles already installed, updating..."
	git -C "$HOME/dotfiles" pull
else
	install
	install_vim
	install_tmux
fi
configure_onpath
#remove_frompath

log "installation occurred successfully! have a good time"
exit 0
<commit_msg>Install gitconfig on default installer<commit_after>#/bin/bash

log() {
	echo "[DOTFILES] $@"
}

install() {
	log "installing dotfiles on $HOME"
	git clone -q https://git@github.com/filipenos/dotfiles "$HOME/dotfiles"
}

configure_onpath() {
	log "configure dotfiles on bashrc"
	if ! grep -q "#DOTFILESRC" $HOME/.bashrc ; then
		echo 'source $HOME/dotfiles/dotfilesrc #DOTFILESRC' >> $HOME/.bashrc
	else
		log "bashrc already configured"
	fi
	log "configure dotfiles on zshrc"
	if ! grep -q "#DOTFILESRC" $HOME/.zshrc ; then
		echo 'source $HOME/dotfiles/dotfilesrc #DOTFILESRC' >> $HOME/.zshrc
	else
		log "zshrc already configured"
	fi
	log "reload your sh shell to use dotfiles"
}

remove_frompath() {
	log "remove dotfilesrc from .bashrc"
	sed -i '/DOTFILESRC/d' "$HOME/.bashrc"
	log "remove dotfilesrc from .zshrc"
	sed -i '/DOTFILESRC/d' "$HOME/.zshrc"
}

install_vim() {
	log "configuring vimrc"
	$HOME/dotfiles/bin/vim-install-vundle
}

install_tmux() {
	log "configuring tmux.conf"
	ln -s $HOME/dotfiles/tmux.conf $HOME/.tmux.conf
}

install_gitconfig() {
  log "Configuring gitconfig"
  ln -s $HOME/dotfiles/gitconfig $HOME/.gitconfig
}

remove() {
	log "removing dotfiles from $HOME"
	rm -rf $HOME/dotfiles
}

if [ -d "$HOME/dotfiles" ]; then
	log "dotfiles already installed, updating..."
	git -C "$HOME/dotfiles" pull
else
	install
	install_vim
	install_tmux
  install_gitconfig
fi
configure_onpath
#remove_frompath

log "installation occurred successfully! have a good time"
exit 0

{'fraction_non_alphanumeric': 0.13124560168895144, 'fraction_numerical': 0.0007037297677691766, 'mean_word_length': 4.131768953068592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '337528', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1074, 'n_words': 291}