#!/usr/bin/env python3 # # Copyright (C) 2024 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """Downloads etm modules from the build server."""
import argparse
import logging import os from pathlib import Path import shutil import stat import textwrap
def fetch_etm_modules(branch: str, build: str, install_dir: str) -> None: """Installs the device specific components of the release."""
install_dir = Path(install_dir)
install_dir.mkdir(exist_ok=True)
target = get_etm_module_target(branch) for name in ETM_MODULES:
fetch_artifact(branch, build, target, name)
dest_file = install_dir / name if dest_file.is_file():
dest_file.unlink()
shutil.move(name, dest_file)
def get_args(): """Parses and returns command line arguments."""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('-b', '--branch', required=True,
choices=['kernel-pixel-android16-gs-pixel-6.12', 'kernel-pixel-android15-gs-pixel-6.6', 'kernel-android14-gs-pixel-6.1', 'kernel-android14-gs-pixel-5.15-24Q3'],
help='Branch to pull build from.')
parser.add_argument('--build', required=True, help='Build number to pull.')
parser.add_argument('-o', dest='install_dir', required=True,
help='Directory to store etm modules')
parser.add_argument('-v', '--verbose', action='count', default=0,
help='Increase output verbosity.') return parser.parse_args()
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.