Files
cappuccino/Rake/lib/objj-executable
T
2009-03-18 23:29:26 -07:00

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 $@