xref: /xnu-10002.61.3/config/generate_linker_exports.sh (revision 0f4c859e951fba394238ab619495c4e1d54d0f34)
1#!/bin/sh
2
3set -e
4
5if [ $# -lt 2 ]; then
6    echo "Usage: $0 output.exp input1 [input2 ... ]" 1>&2
7    exit 1
8fi
9
10OUTPUT="$1"
11shift
12
13# Note: we used to export both sides of the alias since forever
14# for now keep doing this
15
16( grep -h -v ":" "$@"; grep -h ":" "$@" | awk -F: '{print $1; print $2}' ) | sort -u > "$OUTPUT"
17
18exit 0
19