pulsar/script/compile-coffee

22 lines
539 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
# Because of the way xcodebuild invokes external scripts we need to load
# The Setup's environment ourselves. If this isn't done, things like the
# node shim won't be able to find the stuff they need.
2013-03-05 01:41:36 +04:00
node --version > /dev/null 2>&1 || {
if [ -e /opt/github/env.sh ]; then
source /opt/github/env.sh
else
# Try Constructicon's PATH.
export PATH="/usr/local/Cellar/node/0.8.21/bin:${PATH}"
2013-03-05 01:41:36 +04:00
fi
}
INPUT_FILE="${1}"
OUTPUT_DIR=`dirname "$2"`
2013-03-16 06:49:19 +04:00
node_modules/.bin/coffee -c -m -o "$OUTPUT_DIR" "$INPUT_FILE"