Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
infra
bots
assets
protoc
create.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
#
3
# Copyright 2017 Google Inc.
4
#
5
# Use of this source code is governed by a BSD-style license that can be
6
# found in the LICENSE file.
7
8
9
"""Create the asset."""
10
11
12
import
argparse
13
import
subprocess
14
15
16
ZIP_URL = (
'https://github.com/google/protobuf/releases/download/v3.3.0/'
17
'protoc-3.3.0-linux-x86_64.zip'
)
18
19
20
def
create_asset
(target_dir):
21
"""Create the asset."""
22
local_zip =
'/tmp/protoc.zip'
23
subprocess.check_call([
'curl'
,
'-L'
, ZIP_URL,
'-o'
, local_zip])
24
subprocess.check_call([
'unzip'
, local_zip,
'-d'
, target_dir])
25
26
27
def
main
():
28
parser = argparse.ArgumentParser()
29
parser.add_argument(
'--target_dir'
,
'-t'
, required=
True
)
30
args = parser.parse_args()
31
create_asset
(args.target_dir)
32
33
34
if
__name__ ==
'__main__'
:
35
main
()
create.create_asset
create_asset(target_dir)
Definition
create.py:32
create.main
main()
Definition
create.py:69
main
Definition
main.py:1
Generated on Fri Apr 26 2024 06:16:15 for Flutter Engine by
1.9.8