xref: /aoo41x/main/desktop/scripts/unoinfo.sh (revision a96a8d21)
1#!/bin/sh
2#**************************************************************
3#
4#  Licensed to the Apache Software Foundation (ASF) under one
5#  or more contributor license agreements.  See the NOTICE file
6#  distributed with this work for additional information
7#  regarding copyright ownership.  The ASF licenses this file
8#  to you under the Apache License, Version 2.0 (the
9#  "License"); you may not use this file except in compliance
10#  with the License.  You may obtain a copy of the License at
11#
12#    http://www.apache.org/licenses/LICENSE-2.0
13#
14#  Unless required by applicable law or agreed to in writing,
15#  software distributed under the License is distributed on an
16#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17#  KIND, either express or implied.  See the License for the
18#  specific language governing permissions and limitations
19#  under the License.
20#
21#**************************************************************
22
23set -e
24
25# resolve installation directory
26sd_res=$0
27while [ -h "$sd_res" ] ; do
28    cd "`dirname "$sd_res"`"
29    sd_basename=`basename "$sd_res"`
30    sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
31done
32cd "`dirname "$sd_res"`"
33sd_prog=`pwd`
34
35case $1 in
36c++)
37    printf '%s' "$sd_prog"
38    ;;
39java)
40    printf '0%s\0%s\0%s\0%s\0%s' \
41        "$sd_prog/classes/ridl.jar" \
42        "$sd_prog/classes/jurt.jar" \
43        "$sd_prog/classes/java/juh.jar" \
44        "$sd_prog/classes/unoil.jar" "$sd_prog"
45    ;;
46*)
47    exit 1
48    ;;
49esac
50