Skip to content

Commit

Permalink
Make dotfiles user customisable.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Nov 10, 2012
1 parent 7048d16 commit 027dda3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
My dot files shared between machines for ZSH, Bash, OSX, Linux, Cygwin and MSYS.

## Installation
Run [`install-dotfiles.sh`](https://github.com/mikemcquaid/dotfiles/blob/master/install-dotfiles.sh) after checkout to symlink (or copy) everything in this directory to your home directory.
Customise the contents of [`gitconfig-user`](https://github.com/mikemcquaid/dotfiles/blob/master/gitconfig-user).
This is used for user-specific customisations of every other file.

Run [`install-dotfiles.sh`](https://github.com/mikemcquaid/dotfiles/blob/master/install-dotfiles.sh)
after checkout to symlink (or copy) everything in this directory to your home directory.

## Contact
[Mike McQuaid](mailto:[email protected])
Expand Down
13 changes: 3 additions & 10 deletions gitconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
[user]
# Name used in commit messages.
name = Mike McQuaid
# Email used in commit messages.
email = [email protected]
[include]
path = ~/.gitconfig-user
[color]
# Colour terminal command output when possible.
ui = auto
[github]
# Set my GitHub username for command-line tools.
user = mikemcquaid
[gist]
# Open GitHub Gist in browser after submission.
browse = true
Expand Down Expand Up @@ -77,8 +71,7 @@
pull-master = !git checkout master && git pull
# Update the staging, master and current branches.
pull-master-staging-and-current-branch = !BRANCH=$(git current-branch) && git fetch --all && git pull-staging && git pull-master && git checkout $BRANCH && git pull
# Reset the current repository to the state on mikebook and clean it.
mikebook = !git fetch mikebook && git reset --hard mikebook/master && git clean -xdf

# Merge a branch with a merge commit and use the more time-consuming
# patience diff algorithm
patience = !git noff -Xpatience
Expand Down
11 changes: 11 additions & 0 deletions gitconfig-user
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[user]
# Name used in commit messages.
name = Mike McQuaid
# Email used in commit messages.
email = [email protected]
[github]
# Set my GitHub username for command-line tools.
user = mikemcquaid
[alias]
# Reset the current repository to the state on mikebook (my MacBook Pro) and clean it.
mikebook = !git fetch mikebook && git reset --hard mikebook/master && git clean -xdf
1 change: 0 additions & 1 deletion ssh/config
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Host utilmaster *.alltrails.com *.compute.amazonaws.com 184.* 50.* ec2-*
IdentityFile ~/Documents/AllTrails/Chef/.chef/deploy_user

Host *
User mike
StrictHostKeyChecking ask
VerifyHostKeyDNS ask
NoHostAuthenticationForLocalhost yes
Expand Down
5 changes: 4 additions & 1 deletion update-from-github-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Exit on any command failures
set -e

# Extract GitHub username from gitconfig-user
GITHUB_USERNAME=$(grep "user =" gitconfig-user | sed -e 's/.*user = //')

DOTFILESDIRREL=$(dirname $0)
cd $DOTFILESDIRREL
if [ -e .git ]
Expand All @@ -18,6 +21,6 @@ which curl &>/dev/null && DOWNLOAD="curl --progress-bar --location --output $OUT
[ -z "$DOWNLOAD" ] && which wget &>/dev/null && DOWNLOAD="wget --output-document=$OUTFILE"
[ -z "$DOWNLOAD" ] && echo "Could not find curl or wget" && exit 1

$DOWNLOAD https://github.com/mikemcquaid/dotfiles/tarball/master
$DOWNLOAD https://github.com/$GITHUB_USERNAME/dotfiles/archive/master.tar.gz
tar --strip-components=1 -z -x -v -f dotfiles.tar.gz
rm dotfiles.tar.gz

0 comments on commit 027dda3

Please sign in to comment.