~nvalcarcel/ubuntu-desktop-course/ubuntu-desktop-course-translation

« back to all changes in this revision

Viewing changes to contrib/generatePo.sh

  • Committer: Nicolas Valcárcel
  • Date: 2008-02-07 21:13:07 UTC
  • Revision ID: nvalcarcel@ubuntu-pe.org-20080207211307-d5fyt57gg1yvib86
fixed some other bugs on script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
3
# Script for generating .pot files for the ubuntu-desktop-course from the .xml files
 
4
# Developed by Nicolas Valcárcel <nvalcarcel@ubuntu-pe.org>
 
5
# With help of Torsten Spindler <torsten@canonical.com>
4
6
 
5
 
course_path=`pwd | sed "s/\/contrib//" `
 
7
contrib_path=`pwd`/`dirname $0 | sed "s/\.\///"`
 
8
course_path=`echo $contrib_path | sed "s/\/contrib//" `
6
9
 
7
10
for file in `find $course_path -name \*xml` 
8
11
do
9
12
    xsltproc $course_path/lib/instructorguide.xsl $file > $file-normalized
10
13
    potfilename=`basename $file | sed "s/.xml/.pot/"`
11
 
    xml2pot $file-normalized > $orig_path/po/$potfilename
 
14
    xml2pot $file-normalized > $contrib_path/po/$potfilename
12
15
    rm $file-normalized
13
16
done
14
17