1if [ "$1" = install ] 2then 3# backing out existing entries to avoid duplicates 4sed ' 5/application\/vnd\.oasis\.opendocument/d 6/application\/vnd\.sun/d 7/application\/vnd\.stardivision/d 8' ${PKG_INSTALL_ROOT}/etc/mime.types 2>/dev/null 9 10# now append our stuff to the temporary file 11cat << END 12application/vnd.oasis.opendocument.text odt 13application/vnd.oasis.opendocument.text-template ott 14application/vnd.oasis.opendocument.text-web oth 15application/vnd.oasis.opendocument.text-master odm 16application/vnd.oasis.opendocument.graphics odg 17application/vnd.oasis.opendocument.graphics-template otg 18application/vnd.oasis.opendocument.presentation odp 19application/vnd.oasis.opendocument.presentation-template otp 20application/vnd.oasis.opendocument.spreadsheet ods 21application/vnd.oasis.opendocument.spreadsheet-template ots 22application/vnd.oasis.opendocument.chart odc 23application/vnd.oasis.opendocument.formula odf 24application/vnd.oasis.opendocument.image odi 25application/vnd.sun.xml.writer sxw 26application/vnd.sun.xml.writer.template stw 27application/vnd.sun.xml.writer.global sxg 28application/vnd.stardivision.writer sdw vor 29application/vnd.stardivision.writer-global sgl 30application/vnd.sun.xml.calc sxc 31application/vnd.sun.xml.calc.template stc 32application/vnd.stardivision.calc sdc 33application/vnd.stardivision.chart sds 34application/vnd.sun.xml.impress sxi 35application/vnd.sun.xml.impress.template sti 36application/vnd.stardivision.impress sdd sdp 37application/vnd.sun.xml.draw sxd 38application/vnd.sun.xml.draw.template std 39application/vnd.stardivision.draw sda 40application/vnd.sun.xml.math sxm 41application/vnd.stardivision.math smf 42application/vnd.sun.xml.base odb 43application/vnd.openofficeorg.extension oxt 44application/vnd.openxmlformats-officedocument.wordprocessingml.document docx 45application/vnd.ms-word.document.macroenabled.12 docm 46application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx 47application/vnd.ms-word.template.macroenabled.12 dotm 48application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx 49application/vnd.ms-excel.sheet.macroenabled.12 xlsm 50application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx 51application/vnd.ms-excel.template.macroenabled.12 xltm 52application/vnd.openxmlformats-officedocument.presentationml.presentation pptx 53application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm 54application/vnd.openxmlformats-officedocument.presentationml.template potx 55application/vnd.ms-powerpoint.template.macroenabled.12 potm 56END 57else 58cat ${PKG_INSTALL_ROOT}/etc/mime.types 59fi 60