#!/bin/sh
# stklos-script                 -- small wrapper to execute STklos programs as
#                                  scripts (as required by SRFI22)
#
# Copyright © 2001-2020 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
#           Author: Erick Gallesio [eg@unice.fr]
#    Creation date:  4-Nov-2001 19:13 (eg)
# Last file update: 21-Feb-2020 21:44 (eg)
#

if test "$#" -eq "0" ;then
    echo "Usage: $0 program [ arg1 arg2 ...]" >&2
    exit 1
fi
program=$1; shift

# Do not delete the following line (even if its seems useless)
exec_prefix=/opt/local

exec ${exec_prefix}/bin/stklos -f $program -- "$@"
