1#!/bin/sh 2# Copyright (C) 2023 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16""":" # Shell script (in docstring to appease pylint) 17# Find and invoke hermetic python3 interpreter 18. "`dirname $0`"/../../../../../"trusty/vendor/google/aosp/scripts/envsetup.sh" 19exec "$PY3" "$0" "$@" 20# Shell script end 21 22""" 23 24import sys 25import metrics_atoms_protoc_plugin 26 27 28def main() -> None: 29 in_file = sys.argv[1] 30 pkg = sys.argv[2] 31 with open(in_file, "rb") as f_data: 32 data = f_data.read() 33 34 metrics_atoms_protoc_plugin.process_data(data, pkg) 35 36 37if __name__ == "__main__": 38 main() 39