#!/bin/sh
# $Id: fpc,v 1.3 2003/11/10 06:16:25 cher Exp $
# Copyright (c) 2002-2003 Alexander Chernov

# Free Pascal is installed at non-standard location
FPCDIR=/usr/local/pkg/fpc-1.0.10

FPCRUN=fpc
if [ "${FPCDIR}" != "" ]
then
    PATH=${FPCDIR}/bin:${PATH}
    FPCRUN=${FPCDIR}/bin/${FPCRUN}
fi

${FPCRUN} -Ci -Co -Cr -Ct -So -XS $1 -o${2}

#if the output file is not created - compile error
[ -f ${2} ] || exit 1
exit 0

