#!/bin/bash
#
# Copyright (c) New Cloud Technologies, Ltd., 2013-2025
#
# You can not use the contents of the file in any way without New Cloud Technologies, Ltd. written permission.
# To obtain such a permit, you should contact New Cloud Technologies, Ltd. at https://myoffice.ru/contacts/
#
#

# This script is used as main entry point for the myoffice apps launching
# We override libc and ld library path, so need to `cd` to the install directory

# INSTALL_PATH is overriden during the installation phase
cd "/opt/myoffice-education"

if [ -z "$1" ]; then
    ./"MyOffice Spreadsheet.sh"
else
    if [[ "$1" == vnd\.sun\.star\.webdav* ]]; then
        ./myoffice-launcher.sh "$@"
    else
        ./"MyOffice Spreadsheet.sh" "$@"
    fi
fi
