summaryrefslogtreecommitdiff
path: root/shell/source/unix/misc/kde-open-url.sh
blob: 97a7bdf0aae732bcafce7f7eb9beac320b401017 (plain)
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
#!/bin/sh

# restore search path for dynamic loader to system defaults to
# avoid version clashes of mozilla libraries shipped with OOo
case `uname -s` in
  AIX)
    LIBPATH=$SYSTEM_LIBPATH
    if [ -z "$LIBPATH" ]; then
        unset LIBPATH SYSTEM_LIBPATH
    else
        export LIBPATH; unset SYSTEM_LIBPATH
    fi
    ;;

  Darwin)
    DYLD_LIBRARY_PATH=$SYSTEM_DYLD_LIBRARY_PATH
    if [ -z "$DYLD_LIBRARY_PATH" ]; then
        unset DYLD_LIBRARY_PATH SYSTEM_DYLD_LIBRARY_PATH
    else
        export DYLD_LIBRARY_PATH; unset SYSTEM_DYLD_LIBRARY_PATH
    fi
    ;;

  HP-UX)
    SHLIB_PATH=$SYSTEM_SHLIB_PATH
    if [ -z "$SHLIB_PATH" ]; then
        unset SHLIB_PATH SYSTEM_SHLIB_PATH
    else
        export SHLIB_PATH; unset SYSTEM_SHLIB_PATH
    fi
    ;;

  IRIX*)
    LD_LIBRARYN32_PATH=$SYSTEM_LD_LIBRARYN32_PATH
    if [ -z "$LD_LIBRARYN32_PATH" ]; then
        unset LD_LIBRARYN32_PATH SYSTEM_LD_LIBRARYN32_PATH
    else
        export LD_LIBRARYN32_PATH; unset $SYSTEM_LD_LIBRARYN32_PATH
    fi
    ;;

  *)
    LD_LIBRARY_PATH=$SYSTEM_LD_LIBRARY_PATH
    if [ -z "$LD_LIBRARY_PATH" ]; then
        unset LD_LIBRARY_PATH SYSTEM_LD_LIBRARY_PATH
    else
        export LD_LIBRARY_PATH; unset SYSTEM_LD_LIBRARY_PATH
    fi
    ;;
esac

# special handling for mailto: uris
if echo $1 | grep '^mailto:' > /dev/null; then
  kmailservice "$1" &
else
  kfmclient openURL "$1" &
fi

exit 0