Skip to content

Instantly share code, notes, and snippets.

@mattpolito
Created March 2, 2011 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpolito/850978 to your computer and use it in GitHub Desktop.
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
#!/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