Code Uncategorized WordPress

PHPXref for WordPress, BuddyPress, bbPress and Thematic: Local and Updated

I often am working on a variety of WordPress, BuddyPress, and BBPress projects and enjoy working from a lot of not internet connected locations such as trains, buses, parks and the occasional rooftop. As such it’s very handy for me to a local version of PHPXref documents for the current trunk of these products. I’ve written a handy bash script to handle this for me.


# define locations

# check our internet connection
wget -q –tries=10 –timeout=5 -O /tmp/wordpress.svn &> /dev/null
if [ ! -s /tmp/wordpress.svn ];then

# Remove old version
rm -r $PHPXREFLOCATION/output/*

# SVN up each piece
cd $PHPXREFLOCATION/source/thematic
svn up
cd $PHPXREFLOCATION/source/wordpress
svn up
cd $PHPXREFLOCATION/source/bbpress
svn up
cd $PHPXREFLOCATION/source/buddypress
svn up

# Build our new phpxref

#remove the tmp file so it’s not there for next time
rm /tmp/wordpress.svn


I have a cron set up to run this at a few intervals that are least likely to bother me (currently 5am and 4pm). I hope this script helps you out. If you have a similar or better one, please let me know.

3 replies on “PHPXref for WordPress, BuddyPress, bbPress and Thematic: Local and Updated”

I thought about it, but for something this simple I figured it was best to maintain as high readability as possible, and for me that’s best achieved by not doing arrays. Essentially I chose KISS over DRY this time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.