#!/bin/bash # Copyright (C) 2009 Andrius Štikonas # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . source "`dirname $0`/ths-variables" source $THS if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then echo "Usage `basename $0` " exit 1 fi if [ $# -eq 2 ]; then messages="$1" pot="$2" else messages="$potrunk" pot="$pottrunk" fi wdir="`pwd`" cd $pot for dir in `ls`; do cd "$dir" podir="$wdir/$messages/$dir" if [ ! -e "$podir" ]; then mkdir "$podir" svn add "$podir" fi for file in `find . -name *.po`; do po=`echo $file | sed s/.pot/.po/` if [ ! -e "$podir/$po" ]; then echo -e $RED"$dir/$po"$ENDCOLOR msginit -i "$file" -o "$podir/$po" --no-translator svn add "$podir/$po" fi done cd .. done