From 46c887b62d6bff11634f9cf0ea9952738b3f13fd Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Mon, 13 May 2013 18:55:10 -0400 Subject: [PATCH] Rewrite script/build in Python The script is still Mac-specific, but this will make it easier to add Windows support later. --- brightray/script/build | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/brightray/script/build b/brightray/script/build index 515feb65f030..773b847aee00 100755 --- a/brightray/script/build +++ b/brightray/script/build @@ -1,8 +1,18 @@ -#!/bin/sh +#!/usr/bin/env python -set -e +import os +import subprocess -cd "$(dirname "$0")/.." -gyp --depth . brightray.gyp -xcodebuild +SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + + +def main(): + os.chdir(SOURCE_ROOT) + subprocess.check_call(['gyp', '--depth', '.', 'brightray.gyp']) + subprocess.check_call(['xcodebuild']) + + +if __name__ == '__main__': + import sys + sys.exit(main())