Skip to content

Instantly share code, notes, and snippets.

@googya
Created September 29, 2012 01:09
Show Gist options
  • Select an option

  • Save googya/3802810 to your computer and use it in GitHub Desktop.

Select an option

Save googya/3802810 to your computer and use it in GitHub Desktop.
mv dot-files
require 'fileutils'
REJECTED = ['.', '..', '.git']
(Dir.entries('.') - REJECTED).each do |e|
e.scan /^(\.)(.*)/
FileUtils.mv e, $2 if $1 && File.file?(e)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment