mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 13:37:03 +00:00
37 lines
992 B
Bash
Executable File
37 lines
992 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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"
|
|
FRAMEWORKS="$OBJJ_HOME/lib/Frameworks"
|
|
MAIN="$OBJJ_LIB/$(basename $SELF_PATH)/main.j"
|
|
|
|
# convert paths for Cygwin
|
|
if [[ `uname` == CYGWIN* ]]; then
|
|
OBJJ_HOME=`cygpath -w "$OBJJ_HOME"`
|
|
BAKE=`cygpath -w "$BLEND"`
|
|
fi
|
|
|
|
objj -I$FRAMEWORKS $MAIN $@
|