Commit 88579d72 authored by Richard Mansfield's avatar Richard Mansfield

Generate language templates in tarball suitable for launchpad upload

parent 76e64cf9
...@@ -23,7 +23,7 @@ OUT=${DATA}/po ...@@ -23,7 +23,7 @@ OUT=${DATA}/po
[ ! -d ${WORK} ] && mkdir ${WORK} [ ! -d ${WORK} ] && mkdir ${WORK}
[ ! -d ${TEMP} ] && mkdir ${TEMP} [ ! -d ${TEMP} ] && mkdir ${TEMP}
[ ! -d ${OUT} ] && mkdir ${OUT} [ ! -d ${OUT} ] && mkdir ${OUT}
[ ! -d ${DOCROOT}/po ] && mkdir ${DOCROOT}/po [ ! -d ${DOCROOT}/pot ] && mkdir ${DOCROOT}/pot
remote='git://gitorious.org/mahara/mahara.git' remote='git://gitorious.org/mahara/mahara.git'
...@@ -59,8 +59,6 @@ for branch in ${branches} ; do ...@@ -59,8 +59,6 @@ for branch in ${branches} ; do
else else
echo "New commits on ${branch}" echo "New commits on ${branch}"
outputfile=${OUT}/${branch}.pot
if [ ! -d ${GITDIR}/htdocs ] ; then if [ ! -d ${GITDIR}/htdocs ] ; then
echo "No htdocs directory in branch ${branch}; skipping." echo "No htdocs directory in branch ${branch}; skipping."
continue continue
...@@ -85,14 +83,20 @@ for branch in ${branches} ; do ...@@ -85,14 +83,20 @@ for branch in ${branches} ; do
continue continue
fi fi
[ ! -d ${OUT}/${branch} ] && mkdir ${OUT}/${branch}
outputdir=${OUT}/${branch}/mahara
[ ! -d ${outputdir} ] && mkdir ${outputdir}
outputfile=${outputdir}/mahara.pot
echo "Updating ${outputfile}" echo "Updating ${outputfile}"
[ -f ${outputfile} ] && rm ${outputfile} [ -f ${outputfile} ] && rm ${outputfile}
/usr/bin/php ${SCRIPTS}/php-po.php ${langpack} ${langpack} ${outputfile} /usr/bin/php ${SCRIPTS}/php-po.php ${langpack} ${langpack} ${outputfile}
if [ -f ${outputfile} ]; then if [ -f ${outputfile} ]; then
chmod 755 ${outputfile} cd ${OUT}/${branch}
cp ${outputfile} ${DOCROOT}/po tar zcf ${DOCROOT}/pot/${branch}.tar.gz mahara/mahara.pot
cd ${GITDIR}
fi fi
echo "${remotecommit}" > ${last} echo "${remotecommit}" > ${last}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment