#!/bin/bash

#Collection of funtions and aliases to automate the redundant tasks.

#First let's declare a few variables
export company="SCAR-719"

update-DOTFiles() {  #This command takes the local copies and puts them into the git repo for updating 


	rsync -rhHAX --exclude="heroic" --exclude="quassel-irc.org" --exclude="google-chrome" --exclude="PCSX2" --exclude="transmission" --exclude="legendary" --exclude="Element" \
	--exclude="balena-etcher-electron" --exclude="discord" --exclude="discord.bak" --exclude="heroic" --exclude="Slack" --exclude="Code" --exclude="Epic" --exclude="obs-studio" --exclude="BraveSoftware" --exclude="vivaldi" \
	--exclude="microsoft-edge" --exclude="vesktop" \
  $HOME/.config/* $HOME/Projects/$company/repos/DOT-Files/$(awk -F"=" '{print $2}' /etc/lsb-release | head -n1 | tr -d \")/$HOSTNAME/home/user/.config/. ;

	rsync -rhHAX --exclude=".mbsyncrc" $HOME/.*rc $HOME/Projects/$company/repos/DOT-Files/$(awk -F"=" '{print $2}' /etc/lsb-release | head -n1 | tr -d \")/$HOSTNAME/home/user/. ;

	cd /home/ganome/Projects/$company/repos/DOT-Files ;
	git pull ;
	git add .;
	# git commit -am "Automated updated process of shell scripts and DOT Files ($HOSTNAME)" ;
	# git push;
	cd - ;
}

#replace-DOTFile() { #This command takes the git repo configs and moves them onto the local machine - in case remote edits were done and local machine needs updating
#	rsync -rhHAX /home/ganome/Projects/$company/repos/DOT-Files/gentoo/gentooamd/home/user/.bashrc /home/ganome/. ;
#	rsync -rhHAX /home/ganome/Projects/$company/repos/DOT-Files/gentoo/gentooamd/home/user/.config/shellconfig/* /home/ganome/.config/shellconfig/. ;
# }

