3
echo 'kde-config not found ! Aborting. You need a more recent KDE, or to fix your $PATH.'
8
applnks=`kde-config --path apps`:`kde-config --path xdgdata-apps`
13
f=`echo $1 | sed -e 's,//,/,g'`
15
echo -n "Found: $f... "
16
mimetypes=`grep ^MimeType $f|sed -e 's/.*=//;s/;/,/g;'`
17
servicetypes=`grep ^ServiceTypes $f|sed -e 's/.*=//;s/$/,/g'`
18
fulllist="$mimetypes,$servicetypes"
19
if echo $fulllist | grep -q "KOfficePart,"; then
20
echo "ok, this is a KOfficePart"
22
echo '**** KOfficePart not in list of types !'
23
echo Service Types: $fulllist
27
nativemime=`grep X-KDE-NativeMimeType $f`
28
echo Native mimetype : $nativemime
29
if echo $nativemime | grep -q "application/x-$instance"; then
36
for dir in $applnks; do
37
if test -n "$dir"; then
38
echo Looking under applnk dir: $dir
39
f="$dir/Office/$instance.desktop"
44
if [ $found = 0 ]; then
46
echo Now looking by filename
49
for dir in $applnks; do
50
if test -n "$dir"; then
51
echo Looking under applnk dir: $dir
52
for f in `find $dir -name $instance.desktop`; do
59
if [ $found = 0 ]; then
60
echo "***** No $instance.desktop with X-KDE-NativeMimetype in it was found! Installation problem."
67
for dir in `kde-config --path servicetypes`; do
68
echo Service Types dir $dir
69
f=`echo $dir/kofficepart.desktop | sed -e 's,//,/,g'`
77
if [ $stfound = 0 ]; then
78
echo '****** kofficepart.desktop not found!'
79
kde-config --path servicetypes
82
if [ $found = 1 ]; then
83
echo "Everything looks ok"