#!/bin/sh # Place this somewhere where your cron job can get at it. # I haven't actually tried using this... caveat emptor. # # The backup-to-zip process seems to run twice but at arbitrary # times. So run this four times a day to keep it close to being # in sync. # Make sure you fill out the environment variables! # JIRA_BACKUPS = location of jira's periodic zip exports # WORKING = where to do the unzipping and XSLT processing # RDF = output location # XSLTPROC = your xslt processor; argument order may vary! JIRA_BACKUPS= WORKING= RDF= XSLTPROC= ############## # Begin script if [ -z $JIRA_BACKUPS -o -z $WORKING -o -z $RDF -o -z $XSLTPROC ] ; then echo "Please fill in script environment variables before proceeding" exit 0 fi LATEST=`ls -1c $JIRA_BACKUPS | head -1 | cut -c1-17` cp $JIRA_BACKUPS/$LATEST.zip $WORKING unzip $WORKING/$LATEST.zip $XSLTPROC $WORKING/$LATEST.xml jira.xsl > $WORKING/current.rdf mv $WORKING/current.rdf $RDF rm $WORKING/$LATEST.xml $WORKING/$LATEST.zip exit 1