-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake-dbk.sh
executable file
·76 lines (62 loc) · 1.84 KB
/
make-dbk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! /bin/sh
# The AbiWord Document Merger
#
# Copyright (C) 2002 Free Software Foundation.
#
# make-html.sh is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# make-html.sh is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
if [ -n "$ABI_DOC_SOURCE" ]; then
CVS="$ABI_DOC_SOURCE";
else
CVS=`pwd -P`;
fi
if [ -z "$ABI_DOC_DEST" ]; then
ABI_DOC_DEST="$CVS";
fi
if [ -z "$ABI_DOC_PROG" ]; then
ABI_DOC_PROG="abiword";
fi
for help_language in en-US fr-FR pl-PL #de-DE
do
for dir in ./ howto info interface problems tutorial plugins
do
cd $CVS/ABW/$help_language/$dir
for i in $(echo *.abw)
do
n=`echo $i|cut -f1 -d .`
echo $i
# save to docbook, rename to .xml
$ABI_DOC_PROG --to=dbk $i 2>/dev/null
mv $n.dbk $n.xml
done
cd $CVS
done
gnome_help_language=`echo $help_language|cut -f1 -d -`
cd $CVS/ABW/$help_language
rm -rf $ABI_DOC_DEST/help/$gnome_help_language
mkdir -p $ABI_DOC_DEST/help/$gnome_help_language
cp -r */ $ABI_DOC_DEST/help/$gnome_help_language
cp *.xml $ABI_DOC_DEST/help/$gnome_help_language
#find $ABI_DOC_DEST/help -name .svn -exec rm -fr {} \;
for i in $(ls -1d $CVS/help/$gnome_help_language/*/ )
do
rm -f $i/*.info
rm -f $i/*.xhtml
rm -f $i/*.abw
done
cd $CVS
done
# move english help to "C"
mv $CVS/help/en $CVS/help/C