Permalink
Browse files

Make shell script to re-create symlinks that point to common dotfiles.

  • Loading branch information...
1 parent 79baecd commit 751f42911bffa3afa02a294d5be561cb8ce61678 @mkelley33 committed Jul 15, 2012
Showing with 33 additions and 1 deletion.
  1. +7 −0 .gitignore_global
  2. +11 −1 README.md
  3. +15 −0 make_symlinks.sh
View
@@ -0,0 +1,7 @@
+.idea
+*.diff
+.*un~
+.DS_Store
+*.swp
+.netrwhist
+
View
@@ -1,4 +1,14 @@
dotfiles
========
-My public dotfiles such as those I use for git, zsh, vim, and bash.
+My public dotfiles such as those I use for git, zsh, vim, and bash.
+
+Getting started
+===============
+
+First, `cd` to your home directory.
+
+Next, `export DOTFILES_PATH=` to your clone of dotfiles.
+
+Then `source $DOTFILES_PATH/make_symlinks.sh`
+
View
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [ -f ".bashrc" ]; then
+ echo "File .bashrc already exists! Renaming to .bashrc.`date +%m-%d-%y`\n"
+ mv ~/.bashrc ~/.bashrc.`date +%m-%d-%y`
+ echo "Creating .bashrc symlink...\n"
+ ln -s $DOTFILES_PATH/.bashrc
+ echo "Modified files: \n"
+ ll | grep 'bashrc'
+ echo "\n"
+elif [ -L ".bashrc" ]; then
+ echo "Symlink .bashrc already exists!\n"
+ echo "Symlink .bashrc not created!\n"
+fi
+

0 comments on commit 751f429

Please sign in to comment.