Skip to content

Instantly share code, notes, and snippets.

@paulbellamy
Created January 9, 2013 14:09
Show Gist options
  • Save paulbellamy/4493369 to your computer and use it in GitHub Desktop.
Save paulbellamy/4493369 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
current_dir = File.expand_path(File.dirname(__FILE__))
files_dir = File.join(current_dir, "files")
files = Dir[File.join(files_dir, "*")] + Dir[File.join(files_dir, ".[^\.]*")]
files.each do |file|
command = "ln -sfF #{file} $HOME/."
puts command
`#{command}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment