33067317b7
Bug: skia:13476 Change-Id: I6b4be10b48ee1b69f0c5dc6e4ebc0901ca11e053 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555656 Commit-Queue: Arman Uguray <armansito@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
33 lines
791 B
Python
Executable File
33 lines
791 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
# Copyright 2022 Google LLC
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
EMSDK_ROOT = os.path.join('third_party', 'externals', 'emsdk')
|
|
|
|
EMSDK_PATH = os.path.join(EMSDK_ROOT, 'emsdk.py')
|
|
|
|
EMSDK_VERSION = '3.1.15'
|
|
|
|
def main():
|
|
try:
|
|
subprocess.check_call([sys.executable, EMSDK_PATH, 'install', EMSDK_VERSION])
|
|
except subprocess.CalledProcessError:
|
|
print ('Failed to install emsdk')
|
|
return 1
|
|
try:
|
|
subprocess.check_call([sys.executable, EMSDK_PATH, 'activate', EMSDK_VERSION])
|
|
except subprocess.CalledProcessError:
|
|
print ('Failed to activate emsdk')
|
|
return 1
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|