We have an issue where our developers try to update the core WordPress files. I wanted to find a way to keep them honest. here is my script:
# get WordPress cd ~/src/ rm -f ~/src/latest.tar.gz rm -rf ~/src/wordpress/ wget -q http://wordpress.org/latest.tar.gz tar -xzf latest.tar.gz CURRENTVERSION=$(grep "wp_version =" ~/src/wordpress/wp-includes/version.php | cut -f 3 -d " " | sed "s/;//" | sed "s/'//g") # find WordPress installs and compare for installpath in $(find $SEARCHPATH -name wp-config.php) do BASEDIR=$(dirname $installpath) INSTALLEDVERSION=$(grep "wp_version =" $BASEDIR/wp-includes/version.php | cut -f 3 -d " " | sed "s/;//" | sed "s/'//g") if [ $CURRENTVERSION == $INSTALLEDVERSION ]; then echo "====Comparing $BASEDIR to Source====" diff -rq --exclude="wp-content" ~/src/wordpress $BASEDIR #| grep differ fi done
