Created
July 28, 2010 14:37
-
-
Save fwenzel/494711 to your computer and use it in GitHub Desktop.
Auto-update locales kept in git from SVN.
This file contains hidden or 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 | |
# Automatically pull L10n dirs from SVN, compile, then push to git. | |
# Runs on all project dirs named *-autol10n. | |
# Settings | |
GIT=`/usr/bin/which git` | |
FIND=`/usr/bin/which find` | |
DEVDIR=/home/fwenzel/dev | |
# Update everything | |
for dir in `find "$DEVDIR" -maxdepth 1 -name '*-autol10n'`; do | |
cd $dir | |
$GIT pull -q origin master | |
cd locale | |
$GIT svn rebase | |
# Compile .mo, commit if changed | |
./compile-mo.sh . | |
$FIND . -name '*.mo' -exec $GIT add {} \; | |
$GIT status | |
if [ $? -eq 0 ]; then | |
$GIT commit -m 'compiled .mo files (automatic commit)' | |
fi | |
# Push to SVN and git | |
$GIT svn dcommit && $GIT push -q origin master | |
cd .. | |
$GIT add locale | |
$GIT status locale | |
if [ $? -eq 0 ]; then | |
$GIT commit -m 'L10n update (automatic commit)' | |
$GIT push -q origin master | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've checked this gist into mdn/bin/sync_l10n_from_svn_to_git.sh