~ubuntu-branches/ubuntu/natty/vdr-plugin-epgsearch/natty

« back to all changes in this revision

Viewing changes to docsrc2html.sh

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Grimm, Thomas Schmidt
  • Date: 2010-04-04 14:02:02 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100404140202-8wmh9mgrwg2im0yb
Tags: 0.9.25~beta16-3
[ Thomas Schmidt ]
Standards-Version: 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Creates the html pages
 
4
#
 
5
# Needs: pod2html
 
6
#
 
7
# Mike Constabel
 
8
#
 
9
# Version 0.1 - 24.09.2006
 
10
#
 
11
 
 
12
DOCSRC="doc-src"
 
13
 
 
14
if [ ! -s "epgsearch.c" ]; then
 
15
        echo "Cannot find epgsearch.c. Call this script from epgsearch source directory."
 
16
        exit
 
17
fi
 
18
 
 
19
VERSION="$(awk -F\" '/VERSION/ {print $2; exit;}' epgsearch.c)"
 
20
 
 
21
for LANGUAGE in $(ls "$DOCSRC"/); do
 
22
 
 
23
        [ ! -d ""$DOCSRC"/$LANGUAGE" ] && continue
 
24
        mkdir -p html/$LANGUAGE
 
25
        rm html/$LANGUAGE/* 2>/dev/null
 
26
 
 
27
        for i in "$DOCSRC"/$LANGUAGE/*.txt; do
 
28
                echo -ne "create html page: ($LANGUAGE) $(basename "$i" ".txt")..."
 
29
                pod2html --infile="$i" --outfile="html/$LANGUAGE/$(basename "$i" ".txt").html" --norecurse --title="Epgsearch Version $VERSION"
 
30
                if [ $? -eq 0 ]; then
 
31
                        echo " done."
 
32
                else
 
33
                        echo " failed."
 
34
                fi
 
35
        done
 
36
 
 
37
        rm "$DOCSRC"/$LANGUAGE/*~ 2>/dev/null
 
38
done
 
39
 
 
40
echo
 
41
 
 
42
#EOF