qemu/debian/extract-config-opts

12 lines
321 B
Bash
Executable File

#! /bin/sh
# This is a trivial script to parse comments in debian/control
# into a set of system-specific configure options.
# Usage: ./debian/extract-config-opts $OS-$ARCH debian/control
sed -n 's/^# \?--/--/p' $2 | \
while IFS=' ' read f p x; do
[ -n "$p" ] || p="*"
eval "case \$1 in ($p) echo \$f;; esac"
done