From b572c615c26a0a1361d9be5e1934216e5a8ea883 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 1 Apr 2011 18:59:24 -0400 Subject: now deploying with symlinks into the checked out directory --- .gitignore | 2 ++ deploy.sh | 25 +++++++------------------ diff.sh | 16 ---------------- gitconfig | 22 ++++++++++++++++++++++ gitconfig.template | 22 ---------------------- 5 files changed, 31 insertions(+), 56 deletions(-) create mode 100644 .gitignore delete mode 100755 diff.sh create mode 100644 gitconfig delete mode 100644 gitconfig.template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bae75a5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vim/doc/tags +dotfiles-backup diff --git a/deploy.sh b/deploy.sh index 3e659e3..2245cdc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,25 +2,14 @@ set -e -# template git profile -echo "enter your global git user name:" -read name -echo "enter your global git e-mail:" -read email - -sed -e "s|#NAME#|$name|" -e "s|#EMAIL#|$email|" gitconfig.template > gitconfig +rm -rf dotfiles-backup +mkdir -p dotfiles-backup # deploy -for f in vimrc gvimrc gitconfig gitignore zshrc +for f in vimrc gvimrc gitconfig gitignore zshrc zsh vim do - cp $f ~/.${f} + if [ -e ~/.${f} ]; then + mv ~/.${f} dotfiles-backup/${f} + fi + ln -s `pwd`/${f} ~/.${f} done - -mkdir -p ~/.zsh -cp zsh/* ~/.zsh - -mkdir -p ~/.vim -cp -r vim/* ~/.vim - -# clean-up -rm gitconfig diff --git a/diff.sh b/diff.sh deleted file mode 100755 index ffb780b..0000000 --- a/diff.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -diff -U 0 vimrc ~/.vimrc -echo -diff -U 0 gvimrc ~/.gvimrc -echo -diff -U 0 gitconfig.template ~/.gitconfig -echo -diff -U 0 gitignore ~/.gitignore -echo -diff -U 0 zshrc ~/.zshrc -echo -diff -U 0 zsh ~/.zsh - -echo -diff -r -U 0 -x "tags" -x ".netrwhist" vim ~/.vim diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..b17af33 --- /dev/null +++ b/gitconfig @@ -0,0 +1,22 @@ +[user] + name = Matt Singleton + email = matthew.j.singleton@gmail.com + +[alias] + st = status + ci = commit + br = branch + co = checkout + df = diff + lg = log -p + +[core] + whitespace = trailing-space,space-before-tab,cr-at-eol + editor = vim + autocrlf = input + +[push] + default = nothing + +[color] + ui = true diff --git a/gitconfig.template b/gitconfig.template deleted file mode 100644 index 8a783c9..0000000 --- a/gitconfig.template +++ /dev/null @@ -1,22 +0,0 @@ -[user] - name = #NAME# - email = #EMAIL# - -[alias] - st = status - ci = commit - br = branch - co = checkout - df = diff - lg = log -p - -[core] - whitespace = trailing-space,space-before-tab,cr-at-eol - editor = vim - autocrlf = input - -[push] - default = nothing - -[color] - ui = true -- cgit v1.2.3