Created
March 2, 2011 14:02
-
-
Save mattpolito/850978 to your computer and use it in GitHub Desktop.
creates symlinks for your config files into your home directory when in Dropbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'fileutils' | |
HOME_DIR = File.expand_path("~") | |
DROPBOX_DIR = File.expand_path("~/Dropbox/config_files") | |
files = Dir["#{DROPBOX_DIR}/.*"] | |
files.shift(2) | |
files.delete(".*.*.sw*") # remove any vim swap files that may have entered from editing | |
FileUtils.ln_sf(files, HOME_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment