#!/bin/sh
# $FreeBSD: ports/editors/omegaT/files/omegaT.sh.in,v 1.2 2008/11/10 07:37:37 daichi Exp $
# $NetBSD: OmegaT.in,v 1.2 2019/04/16 11:33:18 ryoon Exp $

## If the preferences files is not available
## create a sample one
##
if [ ! -f ${HOME}/.omegat/omegat.prefs ] ; then
  mkdir -m 755 ${HOME}/.omegat
  cp "/usr/pkg/share/OmegaT/omegat.prefs" ${HOME}/.omegat && chmod 644 ${HOME}/.omegat/omegat.prefs
fi

/usr/pkg/java/openjdk17/bin/java -jar "/usr/pkg/share/OmegaT/OmegaT.jar" "$@"
