Skip to content

Instantly share code, notes, and snippets.

@beastaugh
Created January 16, 2009 00:51
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 beastaugh/47744 to your computer and use it in GitHub Desktop.
Save beastaugh/47744 to your computer and use it in GitHub Desktop.
WordPress upgrade script
#!/usr/bin/env ruby
require 'pathname'
CRUFT = %w{index.php license.txt readme.html wp-content/plugins/hello.php}
SITES = %w{tarskitheme.com extralogical.net}.map do |path|
Pathname.new(ENV['HOME']) + "public_html" + path + "public/wp"
end
SITES.each do |site|
`svn update #{site}` # Update WordPress
CRUFT.each {|file| `rm #{site + file}` } # Remove unwanted files
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment