Created
August 1, 2012 12:51
-
-
Save stas/3226610 to your computer and use it in GitHub Desktop.
WordPress tests svn git mirror scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/1 * * * * stas ( cd /home/stas/wordpress-tests && ./update.sh ) >/dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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