Path: blob/main/contrib/libfido2/src/diff_exports.sh
39483 views
#!/bin/sh -u12# Copyright (c) 2018 Yubico AB. All rights reserved.3# Use of this source code is governed by a BSD-style4# license that can be found in the LICENSE file.5# SPDX-License-Identifier: BSD-2-Clause67for f in export.gnu export.llvm export.msvc; do8if [ ! -f "${f}" ]; then9exit 110fi11done1213TMPDIR="$(mktemp -d)"14GNU="${TMPDIR}/gnu"15LLVM="${TMPDIR}/llvm"16MSVC="${TMPDIR}/msvc"1718awk '/^[^*{}]+;$/' export.gnu | tr -d '\t;' | sort > "${GNU}"19sed 's/^_//' export.llvm | sort > "${LLVM}"20grep -v '^EXPORTS$' export.msvc | sort > "${MSVC}"21diff -u "${GNU}" "${LLVM}" && diff -u "${MSVC}" "${LLVM}"22ERROR=$?23rm "${GNU}" "${LLVM}" "${MSVC}"24rmdir "${TMPDIR}"2526exit ${ERROR}272829