Skip to content

Commit

Permalink
Update go script to work on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonChisholm committed Sep 9, 2014
1 parent 09fe41f commit ba7bceb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions go
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
#!/bin/sh
SCRIPT=`readlink -f $0`
readlinkf() {
python -c 'import os,sys;print os.path.realpath(sys.argv[1])' $1
}
SCRIPT=`readlinkf $0`
PROJECT_ROOT=`dirname $SCRIPT`
# Force Python processes to be unbuffered. Avoids jumbled output
# during CI builds caused by buffering of stdout.
export PYTHONUNBUFFERED=x
if [ -z "$OHDEVTOOLS_ROOT" ]; then
export OHDEVTOOLS_ROOT=`readlink -f $PROJECT_ROOT/ohdevtools`
export OHDEVTOOLS_ROOT=`readlinkf $PROJECT_ROOT/ohdevtools`
fi
if [ ! -e "$OHDEVTOOLS_ROOT" ]; then
export OHDEVTOOLS_ROOT=`readlink -f $PROJECT_ROOT/../ohdevtools`
export OHDEVTOOLS_ROOT=`readlinkf $PROJECT_ROOT/ohDevTools`
fi
if [ ! -e "$OHDEVTOOLS_ROOT" ]; then
export OHDEVTOOLS_ROOT=`readlinkf $PROJECT_ROOT/../ohdevtools`
fi
if [ ! -e "$OHDEVTOOLS_ROOT" ]; then
export OHDEVTOOLS_ROOT=`readlinkf $PROJECT_ROOT/../ohDevTools`
fi
if [ ! -e "$OHDEVTOOLS_ROOT" ]; then
echo OHDEVTOOLS_ROOT not set.
Expand Down

0 comments on commit ba7bceb

Please sign in to comment.