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.

<br />
#!/bin/bash</p>
<p># define locations<br />
PHPXREFLOCATION=&#8217;/full/path/to/phpxref/folder/with/no/trailing/slash&#8217;</p>
<p># check our internet connection<br />
wget -q &#8211;tries=10 &#8211;timeout=5 http://core.svn.wordpress.org/trunk/ -O /tmp/wordpress.svn &amp;&gt; /dev/null<br />
if [ ! -s /tmp/wordpress.svn ];then</p>
<p># Remove old version<br />
rm -r $PHPXREFLOCATION/output/*</p>
<p># SVN up each piece<br />
cd $PHPXREFLOCATION/source/thematic<br />
svn up<br />
cd $PHPXREFLOCATION/source/wordpress<br />
svn up<br />
cd $PHPXREFLOCATION/source/bbpress<br />
svn up<br />
cd $PHPXREFLOCATION/source/buddypress<br />
svn up<br />
cd $PHPXREFLOCATION/</p>
<p># Build our new phpxref<br />
perl phpxref.pl</p>
<p>#remove the tmp file so it&#8217;s not there for next time<br />
rm /tmp/wordpress.svn</p>
<p>fi<br />

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.

By

Reply

*/