#!/bin/sh
# Wrap script for search and run OOo in host system
# Copyright 2007 Konstantin Kondratyuk
# Copyright 2007 Vitaly Lipatov
# FIXME: GUI warning, test with OOo from InfraResource

UNIXPATH=`winepath "$1"`
OOFFICE=`which ooffice 2>/dev/null`
test -z "$OOFFICE" && OOFFICE=`which openoffice.org2.2 2>/dev/null`
test -z "$OOFFICE" && OOFFICE=`which soffice 2>/dev/null`
test -z "$OOFFICE" && { echo "OpenOffice.org is not found on your system, check for ooffice executable in PATH" ; exit 1 ; }
$OOFFICE "$UNIXPATH"
