Skip to content

Instantly share code, notes, and snippets.

@altamic
Created March 20, 2009 10:08
Show Gist options
  • Save altamic/82308 to your computer and use it in GitHub Desktop.
Save altamic/82308 to your computer and use it in GitHub Desktop.
# purge.rb
def delete_if_existent(file_name)
run "\[ -e #{file_name} \] && rm #{file_name}"
end
# Delete unnecessary files
%w(README public/index.html public/favicon.ico public/robots.txt public/images/rails.png).each do |file_name|
delete_if_existent(file_name)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment