forked from cappuccino/cappuccino
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup of shell scripts, change shebang to bash, etc
- Loading branch information
Tom Robinson
authored and
Ross Boucher
committed
Mar 25, 2009
1 parent
f04a199
commit 932aa87
Showing
4 changed files
with
58 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,24 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# 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 | ||
# get path of the executable | ||
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") | ||
|
||
OBJJ_LIB="$OBJJ_HOME/lib" | ||
FRAMEWORKS="$OBJJ_HOME/lib/Frameworks" | ||
MAIN="$OBJJ_LIB/$(basename $SELF_PATH)/main.j" | ||
# resolve symlinks | ||
if [ -h $SELF_PATH ]; then | ||
SELF_PATH=`readlink $SELF_PATH` | ||
fi | ||
|
||
SELF_DIR=`dirname $SELF_PATH` | ||
SELF_HOME=`dirname $SELF_DIR` | ||
SELF_LIB="$SELF_HOME/lib" | ||
|
||
FRAMEWORKS="$SELF_LIB/Frameworks" | ||
MAIN="$SELF_LIB/$(basename $SELF_PATH)/main.j" | ||
|
||
# convert paths for Cygwin | ||
if [[ `uname` == CYGWIN* ]]; then | ||
OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` | ||
BAKE=`cygpath -w "$BLEND"` | ||
FRAMEWORKS=`cygpath -w "$FRAMEWORKS"` | ||
MAIN=`cygpath -w "$MAIN"` | ||
fi | ||
|
||
objj -I$FRAMEWORKS $MAIN $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters