diff_exports.sh revision 1.1.1.1
1#!/bin/bash -u 2 3# Copyright (c) 2018 Yubico AB. All rights reserved. 4# Use of this source code is governed by a BSD-style 5# license that can be found in the LICENSE file. 6 7[[ ! -f export.gnu || ! -f export.llvm || ! -f export.msvc ]] && exit 1 8 9TMPDIR=$(mktemp -d) 10GNU=${TMPDIR}/gnu 11LLVM=${TMPDIR}/llvm 12MSVC=${TMPDIR}/msvc 13 14egrep -o $'([^*{}\t]+);$' export.gnu | tr -d ';' | sort > ${GNU} 15sed 's/^_//g' export.llvm | sort > ${LLVM} 16egrep -v "^EXPORTS$" export.msvc | sort > ${MSVC} 17diff -u ${GNU} ${LLVM} && diff -u ${MSVC} ${LLVM} 18ERROR=$? 19 20rm ${GNU} ${LLVM} ${MSVC} 21rmdir ${TMPDIR} 22 23exit ${ERROR} 24