33 lines
1.2 KiB
Bash
Executable File
33 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Compile translations
|
|
# Copyright (C) 2007-2008 Andrius Štikonas <andrius@stikonas.eu>
|
|
#
|
|
# 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 <http://www.gnu.org/licenses/>.
|
|
|
|
source "$(dirname "$0")/variables"
|
|
|
|
for BRANCH in $BRANCHES; do
|
|
echo -e "Repository: $BLUE$BRANCH$ENDCOLOR"
|
|
if [ ! -e "$MDIR/$BRANCH" ]; then
|
|
mkdir -p "$MDIR/$BRANCH"
|
|
fi
|
|
for file in $(ls "$BRANCH"); do
|
|
echo "Compiling $file";
|
|
$MSGFMT "$BRANCH/$file" -o "$MDIR/$BRANCH/$(echo wesnoth-"$file" | sed "s/.$LCODE.po/.mo/" | sed "s/wesnoth-wesnoth/wesnoth/")"
|
|
done
|
|
rm "$MDIR/$BRANCH/wesnoth-manpages.mo" "$MDIR/$BRANCH/wesnoth-manual.mo"
|
|
done
|
|
|
|
echo -e "${GREEN}Finished.$ENDCOLOR"
|