File: extract-config-opts

package info (click to toggle)
qemu 1%3A2.8%2Bdfsg-6%2Bdeb9u9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 80,664 kB
  • sloc: ansic: 1,023,075; sh: 16,809; python: 15,697; cpp: 12,293; asm: 11,295; perl: 4,421; makefile: 2,076; objc: 1,224; xml: 708
file content (11 lines) | stat: -rwxr-xr-x 313 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
#! /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 read f p x; do
  [ -n "$p" ] || p="*"
  eval "case \$1 in ($p) echo \$f;; esac"
done