cryptonas/scripts/fetch_po_files.sh

25 lines
925 B
Bash
Executable File

#!/bin/sh
# this script symlinks all cbx po files to the thoraxs pootle dir
BASEPATH="/home/cryptobox/cbx-svn/trunk"
#TARGETPATH="/home/cryptobox/pootle-files"
TARGETPATH="/home/cryptobox/pootle-files"
## pot for the server
find ${BASEPATH}/intl/ -name *.pot -exec ln -s '{}' ${TARGETPATH}/ \;
for language in `ls ${BASEPATH}/intl/` ; do
[ ! -d ${TARGETPATH}/${language} ] && mkdir -p ${TARGETPATH}/${language}
## po for the server
find ${BASEPATH}/intl/${language} -name *.po -exec ln -s '{}' ${TARGETPATH}/${language}/ \; 1 &>2 >/dev/null
for plugin in `ls ${BASEPATH}/plugins/`; do
## po & pot for plugins
find ${BASEPATH}/plugins/${plugin}/intl/ -name *.pot -exec ln -s '{}' ${TARGETPATH}/ \; 1 &>2 >/dev/null
find ${BASEPATH}/plugins/${plugin}/intl/${language} -name *.po -exec ln -s '{}' ${TARGETPATH}/${language}/ \; 1 &>2 >/dev/null
done
done
chown -R pootle. ${TARGETPATH}
/etc/init.d/pootle restart