1#!/usr/bin/env python 2# 3# Copyright 2019 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"""Common vars used by scripts in this directory.""" 10 11 12import os 13import sys 14 15FILE_DIR = os.path.dirname(os.path.abspath(__file__)) 16INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir)) 17 18sys.path.insert(0, INFRA_BOTS_DIR) 19from assets import assets 20 21ASSET_NAME = os.path.basename(FILE_DIR) 22 23 24def run(cmd): 25 """Run a command, eg. "upload" or "download". """ 26 assets.main([cmd, ASSET_NAME] + sys.argv[1:]) 27