Skip to content

Instantly share code, notes, and snippets.

@lfittl
Created January 26, 2011 22:07
Show Gist options
  • Save lfittl/797583 to your computer and use it in GitHub Desktop.
Save lfittl/797583 to your computer and use it in GitHub Desktop.
Cronjob script for syncing mongrel2 fossil to git
#!/bin/bash
echo "*** STARTING SYNC `date` ***" >> /root/sync.log
/root/fossil/fossil pull -R /root/mongrel2.fossil http://mongrel2.org:44445/ >> /root/sync.log
cd /root/mongrel2
/root/fossil/fossil export -R /root/mongrel2.fossil | git fast-import --quiet >> /root/sync.log
git push --all origin >> /root/sync.log 2>&1
echo "*** FINISHED SYNC `date` ***" >> /root/sync.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment