summaryrefslogtreecommitdiff
path: root/src/diff_exports.sh
diff options
context:
space:
mode:
authornicoo <nicoo@debian.org>2020-02-12 13:43:18 +0100
committerNicolas Braud-Santoni <nicolas@braud-santoni.eu>2020-02-12 13:43:18 +0100
commit88a8bdd35ca7fb0c1ce70abdd8262d958fedafc1 (patch)
treece42d9d46d371c05eed82d8bb1e8aa7b2522a769 /src/diff_exports.sh
parent4e06e4554b69e678110563b1cf00a258a202dd7b (diff)
parentc79050aa44b8836d836c5dd22a383a073c28b74b (diff)
Merge upstream release 1.3.0 into debian/sid
Diffstat (limited to 'src/diff_exports.sh')
-rwxr-xr-xsrc/diff_exports.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/diff_exports.sh b/src/diff_exports.sh
new file mode 100755
index 0000000..7920f47
--- /dev/null
+++ b/src/diff_exports.sh
@@ -0,0 +1,23 @@
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}