As you might know, YOURLS development is now hosted on Github. It's now easy to download the current development snapshot, since Github provides an archive/master.zip.
But not so long ago, YOURLS dev was hosted on Google Code, where there is no such convenient way to download the current SVN trunk as a .zip archive. To generate "nightly builds", I wrote this little script:
- #!/bin/bash
- # Simple bash script to generate YOURLS nightly builds
- # Export in a year-month-day directory
- PWD="/home/ozh/yourls.org/nightly-builds"
- BUILD=$(date +%Y-%m-%d)
- svn -q export http://yourls.googlecode.com/svn/trunk/ $PWD/$BUILD
- # Make package and remove dir
- cd $PWD
- zip -r -q yourls-$BUILD.zip $BUILD
- rm -rf $BUILD
- # Remove old (>7 days) builds
- find $PWD/*zip -mtime +7 -exec rm {} \;
Now you just need to add the script to your cron jobs and call it every night.