Skip to content

Instantly share code, notes, and snippets.

@ozh
Created April 24, 2013 16:53
Show Gist options
  • Select an option

  • Save ozh/5453664 to your computer and use it in GitHub Desktop.

Select an option

Save ozh/5453664 to your computer and use it in GitHub Desktop.
Nightly build from an SVN repo
#!/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 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment