From c131f122778c62f920a99bbf854ced4a37ee8b03 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 3 Dec 2023 19:23:35 +0100 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- util/make-sym-extractor | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 util/make-sym-extractor (limited to 'util/make-sym-extractor') diff --git a/util/make-sym-extractor b/util/make-sym-extractor new file mode 100755 index 0000000..7fec6b8 --- /dev/null +++ b/util/make-sym-extractor @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +test $# = 2 + +symbols="$1" +how="" +deps="" +set $(printf '%s\n' "$2" | tr ',|' ' ') + +for dep; do + if test "$dep" = mask || test "$dep" = enum; then + test -z "$how" + how="$dep" + else + deps="$deps $dep" + fi +done + +test -n "$how" + +dir="$(dirname -- "$0")" + +$dir/make-$how "$symbols" $deps -- cgit v1.2.3-70-g09d2