Skip to content

Instantly share code, notes, and snippets.

@stas
Created August 1, 2012 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stas/3226610 to your computer and use it in GitHub Desktop.
Save stas/3226610 to your computer and use it in GitHub Desktop.
WordPress tests svn git mirror scripts
*/1 * * * * stas ( cd /home/stas/wordpress-tests && ./update.sh ) >/dev/null 2>&1
#!/bin/bash
[[ -s "/home/stas/.rvm/scripts/rvm" ]] && source "/home/stas/.rvm/scripts/rvm"
rvm use 1.9.2-p180 --default
file="working.lock"
if [ -f "$file" ]
then
exit 0;
fi
touch $file
cd repo
### Update svn2git
svn2git --rebase
### Push changes
git push --all
git push --tags
rm -rf .git/svn/.caches/*
cd ../
rm $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment