mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-30 22:27:42 +00:00
58 lines
1.7 KiB
Bash
Executable File
58 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# blend
|
|
# blend
|
|
#
|
|
# Created by Francisco Tolmasky.
|
|
# Copyright 2008, 280 North, Inc.
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
#
|
|
# This library 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
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
#
|
|
|
|
# if OBJJ_HOME isn't set, try to determine it
|
|
if [ -z $OBJJ_HOME ]; then
|
|
# get path of the executable
|
|
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
|
|
|
|
# resolve symlinks
|
|
if [ -h $SELF_PATH ]; then
|
|
SELF_PATH=`readlink $SELF_PATH`
|
|
fi
|
|
|
|
# get second ancestor directory
|
|
SELF_DIR=`dirname $SELF_PATH`
|
|
export OBJJ_HOME=`dirname $SELF_DIR`
|
|
|
|
# check to ensure it exists, print message
|
|
if [ -d $OBJJ_HOME ]; then
|
|
echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2
|
|
else
|
|
echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2
|
|
exit 2
|
|
fi
|
|
fi
|
|
|
|
OBJJ_LIB="$OBJJ_HOME/lib"
|
|
|
|
BLEND="$OBJJ_LIB/blend/main.j"
|
|
|
|
# convert paths for Cygwin
|
|
if [[ `uname` == CYGWIN* ]]; then
|
|
OBJJ_HOME=`cygpath -w "$OBJJ_HOME"`
|
|
BAKE=`cygpath -w "$BLEND"`
|
|
fi
|
|
|
|
objj $BLEND $@
|