1#!/usr/bin/env bash 2# Copyright (c) 2024 Huawei Device Co., Ltd. 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15set -e 16set -u 17set -o pipefail 18 19main() { 20 local -r input_file="${1:?}" 21 local -r output_file="${2:?}" 22 23 cat <<EOF | sed "s|HEADER_FILE|${input_file}|g" >"${output_file}" 24/* 25 * Copyright (c) 2024 Huawei Device Co., Ltd. 26 * Licensed under the Apache License, Version 2.0 (the "License"); 27 * you may not use this file except in compliance with the License. 28 * You may obtain a copy of the License at 29 * 30 * http://www.apache.org/licenses/LICENSE-2.0 31 * 32 * Unless required by applicable law or agreed to in writing, software 33 * distributed under the License is distributed on an "AS IS" BASIS, 34 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 35 * See the License for the specific language governing permissions and 36 * limitations under the License. 37 */ 38 39#include "HEADER_FILE" 40 41/* 42 * This is autogenerated file, do not edit! 43 */ 44 45/* 46 * This a canary file to check that the public API conforms to: 47 * -std=c99 -pedantic -pedantic-errors -Wall -Wextra -Werror 48 */ 49 50int main(int argc, char **argv) 51{ 52 (void)argc; 53 (void)argv; 54 return 0; 55} 56 57EOF 58} 59 60main "$@" 61