Created
October 8, 2012 05:54
-
-
Save evansolomon/3850933 to your computer and use it in GitHub Desktop.
WordPress update script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete core directories | |
rm -rf wp-includes/ wp-admin/ | |
# Delete core files in the root | |
ls -l | ack "^[^d]" | ack "\swp[^\s]*$" | awk '{print $9}' | xargs rm | |
# Recover wp-config | |
git checkout wp-config.php | |
# Update to trunk | |
svn export http://core.svn.wordpress.org/trunk . --force | |
# Add new files | |
git add . | |
# Tell git about deleted files | |
git status | ack deleted | awk '{print $3}' | xargs git rm | |
# Add a couple line breaks to separate the new git status | |
echo "\n\n\n" | |
# Print the new status | |
git status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment