commit
ebabb0aef2
3 changed files with 61 additions and 25 deletions
|
@ -1,26 +1,52 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env python
|
||||||
#/ Usage: bootstrap https://base.url.com/from/libchromiumcontent/script/upload
|
|
||||||
#/ Bootstrap this project.
|
|
||||||
|
|
||||||
set -e
|
import argparse
|
||||||
|
import errno
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
usage() {
|
|
||||||
grep '^#/' <"$0"| cut -c4-
|
|
||||||
}
|
|
||||||
|
|
||||||
BASE_URL="${1}"
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
|
||||||
|
DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
|
||||||
|
|
||||||
if [ -z "${BASE_URL}" ]; then
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
def main():
|
||||||
|
args = parse_args()
|
||||||
|
update_submodules()
|
||||||
|
download_libchromiumcontent(args.url)
|
||||||
|
|
||||||
git submodule sync --quiet
|
|
||||||
git submodule update --init --recursive
|
|
||||||
|
|
||||||
SOURCE_ROOT="$(pwd -P)"
|
def parse_args():
|
||||||
DOWNLOAD_DIR="${SOURCE_ROOT}/vendor/download"
|
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||||
mkdir -p "${DOWNLOAD_DIR}"
|
parser.add_argument('url', help='The base URL from which to download '
|
||||||
vendor/libchromiumcontent/script/download -f "${BASE_URL}" "${DOWNLOAD_DIR}/libchromiumcontent"
|
'libchromiumcontent (i.e., the URL you passed to '
|
||||||
|
'libchromiumcontent\'s script/upload script')
|
||||||
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def update_submodules():
|
||||||
|
subprocess.check_call(['git', 'submodule', 'sync', '--quiet'])
|
||||||
|
subprocess.check_call(['git', 'submodule', 'update', '--init',
|
||||||
|
'--recursive'])
|
||||||
|
|
||||||
|
|
||||||
|
def download_libchromiumcontent(url):
|
||||||
|
mkdir_p(DOWNLOAD_DIR)
|
||||||
|
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||||
|
'download')
|
||||||
|
subprocess.check_call([sys.executable, download, '-f', url,
|
||||||
|
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
|
||||||
|
|
||||||
|
|
||||||
|
def mkdir_p(path):
|
||||||
|
try:
|
||||||
|
os.makedirs(path)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno != errno.EEXIST:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env python
|
||||||
|
|
||||||
set -e
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
|
||||||
|
|
||||||
gyp --depth . brightray.gyp
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
xcodebuild
|
|
||||||
|
|
||||||
|
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())
|
||||||
|
|
2
brightray/vendor/libchromiumcontent
vendored
2
brightray/vendor/libchromiumcontent
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit d5cef3b0fe5d3cf4360febbde1183447fc906aad
|
Subproject commit 588f36848bced9ff4f780d26d070a53443a5f230
|
Loading…
Reference in a new issue