Tom %!s(int64=12) %!d(string=hai) anos
pai
achega
5f9f5ef9e3
Modificáronse 2 ficheiros con 20 adicións e 5 borrados
  1. 1 0
      .gitconfig
  2. 19 5
      setup.sh

+ 1 - 0
.gitconfig

@@ -0,0 +1 @@
+dotfiles/.gitconfig

+ 19 - 5
setup.sh

@@ -1,6 +1,20 @@
-# github
-git config --global user.email "tom@chillidonut.com"
-
 # symlink bash files (no delete)
-ln -s dotfiles/.bashrc ~/.bashrc
-ln -s dotfiles/.bash_logout ~/.bash_logout
+echo "# Backing up files: if not removed, will be deleted."
+
+if [[ ! -f ~/.bashrc ]]; then
+  mv -i ~/.bashrc ~/.bashrc.bak;
+  rm ~/.bashrc 2> /dev/null
+fi
+ln -s ~/dotfiles/.bashrc ~/.bashrc
+
+if [[ ! -f ~/.bash_logout ]]; then
+  mv -i ~/.bash_logout ~/.bash_logout.bak;
+  rm ~/.bash_logout 2> /dev/null
+fi
+ln -s ~/dotfiles/.bash_logout ~/.bash_logout
+
+if [[ ! -f ~/.gitconfig ]]; then
+  mv -i ~/.gitconfig ~/.gitconfig.bak;
+  rm ~/.gitconfig 2> /dev/null
+fi
+ln -s ~/dotfiles/.gitconfig ~/.gitconfig