merge the formfield patch from ooo-build
[ooovba.git] / sysui / desktop / solaris / mailcap
blob5c8a1d51350be91a9fe2514bba83477106049f58
1 if [ "$1" = install ]
2 then
3 # backing out existing entries to avoid duplicates
4 sed '
5 /^# OpenOffice.org/d
6 /^application\/vnd\.oasis\.opendocument/d
7 /^application\/vnd\.openofficeorg/d
8 /^application\/vnd\.sun/d
9 /^application\/vnd\.stardivision/d
10 /^application\/vnd\.ms-word/d
11 /^application\/vnd\.ms-excel/d
12 /^application\/vnd\.ms-powerpoint/d
13 /^application\/x-star/d
14 /excel/d
15 /ms[-]*word/d
16 /powerpoint/d
17 ' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null
19 # now append our stuff to the temporary file
20 cat << END
21 # OpenOffice.org
22 application/vnd.oasis.opendocument.text; %PREFIX -view %s
23 application/vnd.oasis.opendocument.text-template; %PREFIX -view %s
24 application/vnd.oasis.opendocument.text-web; %PREFIX -view %s
25 application/vnd.oasis.opendocument.text-master; %PREFIX -view %s
26 application/vnd.sun.xml.writer; %PREFIX -view %s
27 application/vnd.sun.xml.writer.template; %PREFIX -view %s
28 application/vnd.sun.xml.writer.global; %PREFIX -view %s
29 application/vnd.stardivision.writer; %PREFIX -view %s
30 application/vnd.stardivision.writer-global; %PREFIX -view %s
31 application/x-starwriter; %PREFIX -view %s
32 application/vnd.oasis.opendocument.formula; %PREFIX -view %s
33 application/vnd.sun.xml.math; %PREFIX -view %s
34 application/vnd.stardivision.math; %PREFIX -view %s
35 application/x-starmath; %PREFIX -view %s
36 application/msword; %PREFIX -view %s
37 application/vnd.oasis.opendocument.spreadsheet; %PREFIX -view %s
38 application/vnd.oasis.opendocument.spreadsheet-template; %PREFIX -view %s
39 application/vnd.sun.xml.calc; %PREFIX -view %s
40 application/vnd.sun.xml.calc.template; %PREFIX -view %s
41 application/vnd.stardivision.calc; %PREFIX -view %s
42 application/x-starcalc; %PREFIX -view %s
43 application/vnd.stardivision.chart; %PREFIX -view %s
44 application/x-starchart; %PREFIX -view %s
45 application/excel; %PREFIX -view %s
46 application/msexcel; %PREFIX -view %s
47 application/vnd.ms-excel; %PREFIX -view %s
48 application/x-msexcel; %PREFIX -view %s
49 application/vnd.oasis.opendocument.presentation; %PREFIX -view %s
50 application/vnd.oasis.opendocument.presentation-template; %PREFIX -view %s
51 application/vnd.sun.xml.impress; %PREFIX -view %s
52 application/vnd.sun.xml.impress.template; %PREFIX -view %s
53 application/vnd.stardivision.impress; %PREFIX -view %s
54 application/x-starimpress; %PREFIX -view %s
55 application/powerpoint; %PREFIX -view %s
56 application/mspowerpoint; %PREFIX -view %s
57 application/vnd.ms-powerpoint; %PREFIX -view %s
58 application/x-mspowerpoint; %PREFIX -view %s
59 application/vnd.oasis.opendocument.graphics; %PREFIX -view %s
60 application/vnd.oasis.opendocument.graphics-template; %PREFIX -view %s
61 application/vnd.sun.xml.draw; %PREFIX -view %s
62 application/vnd.sun.xml.draw.template; %PREFIX -view %s
63 application/vnd.stardivision.draw; %PREFIX -view %s
64 application/x-stardraw; %PREFIX -view %s
65 application/vnd.sun.xml.base; %PREFIX -view %s
66 application/vnd.oasis.opendocument.database; %PREFIX -view %s
67 application/vnd.writerperfect; %PREFIX -view %s
68 application/wordperfect5.1; %PREFIX -view %s
69 application/x-wordperfect; %PREFIX -view %s
70 application/wordperfect; %PREFIX -view %s
71 application/wpwin; %PREFIX -view %s
72 application/vnd.openofficeorg.extension; %PREFIX %s
73 END
74 else
75 # backing all entries pointing to our binary
76 sed '/%PREFIX/d' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null