From 55aeea782fc011c723f4570e1453190069dd803f Mon Sep 17 00:00:00 2001 From: age Date: Fri, 1 Dec 2006 19:26:30 +0000 Subject: [PATCH] just links --- scripts/fetch_po_files.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/fetch_po_files.sh b/scripts/fetch_po_files.sh index 24fb360..1b43e6d 100755 --- a/scripts/fetch_po_files.sh +++ b/scripts/fetch_po_files.sh @@ -1,12 +1,23 @@ #!/bin/sh -# this script fetches all cbx po files and copies them into thoraxs pootle dir +# 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" -[ "`ls ${TARGETPATH}/`" ] && echo "$TARGETPATH is not empty; make sure we don't overwrite some translations!" && exit 2 -cp -r ${BASEPATH}/intl/* ${TARGETPATH}/ -for i in `ls ${BASEPATH}/plugins`; do - [ -d ${BASEPATH}/plugins/${i}/intl ] && cp -r ${BASEPATH}/plugins/${i}/intl/* ${TARGETPATH}/ +## 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}