mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
33 lines
1.1 KiB
Bash
Executable File
33 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# This can only be run by xcode or xcodebuild!
|
|
|
|
# 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.
|
|
|
|
if [ -f /opt/github/env.sh ]; then
|
|
source /opt/github/env.sh
|
|
fi
|
|
|
|
RESOUCES_PATH="$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
|
|
mkdir -p "$RESOUCES_PATH/v8_extensions"
|
|
cp "$PROJECT_DIR/native/v8_extensions/"*.js "$RESOUCES_PATH/v8_extensions/"
|
|
|
|
DIRS="src static vendor"
|
|
|
|
# Compile and .coffee files into bundle
|
|
COFFEE_FILES=$(find $DIRS -type file -name '*.coffee')
|
|
for COFFEE_FILE in $COFFEE_FILES; do
|
|
echo $COFFEE_FILE
|
|
JS_FILE=$(echo "$RESOUCES_PATH/$COFFEE_FILE" | sed 's/.coffee/.js/' )
|
|
OUTPUT_PATH="$RESOUCES_PATH/$(dirname "$COFFEE_FILE")"
|
|
|
|
if [ $COFFEE_FILE -nt "$JS_FILE" ]; then
|
|
mkdir -p "$OUTPUT_PATH"
|
|
node_modules/.bin/coffee -c -o "$OUTPUT_PATH" "$COFFEE_FILE" || exit 1
|
|
fi
|
|
done;
|
|
|
|
# Copy non-coffee files into bundle
|
|
rsync --archive --recursive --exclude="src/**/*.coffee" src static vendor spec benchmark themes "$RESOUCES_PATH"
|