[go: up one dir, main page]

Menu

[3793f0]: / update-locales  Maximize  Restore  History

Download this file

37 lines (28 with data), 642 Bytes

#!/bin/sh

PROG=roxterm

APP_DIR=`dirname "$0"`
APP_DIR=`cd "$APP_DIR";pwd`; export APP_DIR

podir="${APP_DIR}/po"
locdir="${APP_DIR}/locale"

if [ "$1" = "--remake" ] ; then
	remake=1
else
	remake=1
	for gmo in "$podir"/*.gmo ; do
		[ -f "$gmo" ] && remake=
	done
fi

if [ -n "$remake" ] ; then
	rm -f "$podir"/*.gmo "$podir"/*.pot "$podir"/stamp-po
	make -C "$podir"
fi

mkdir -p "$locdir"

for gmo in "$podir"/*.gmo ; do
	if [ -f "$gmo" ] ; then
		lang=`basename "$gmo" | sed 's/\.gmo$//'`
		ldir="${locdir}/${lang}/LC_MESSAGES"
		mkdir -p "$ldir"
		ln -nfs "../../../po/${lang}.gmo" "${ldir}/${PROG}.mo"
	fi
done

touch "${locdir}/stamp"