17NODE_URL =
"https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz"
18NODE_EXTRACT_NAME =
"node-v12.16.3-linux-x64"
22 """Create the asset."""
23 p1 = subprocess.Popen([
"curl", NODE_URL], stdout=subprocess.PIPE)
24 p2 = subprocess.Popen([
"tar",
"-C", target_dir,
"-xJf" "-"], stdin=p1.stdout)
26 _,_ = p2.communicate()
28 os.path.join(target_dir, NODE_EXTRACT_NAME),
29 os.path.join(target_dir,
"node")
34 parser = argparse.ArgumentParser()
35 parser.add_argument(
'--target_dir',
'-t', required=
True)
36 args = parser.parse_args()
40if __name__ ==
'__main__':
def create_asset(target_dir)