Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (30 sloc) 0.845 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#!/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/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
Something went wrong with that request. Please try again.