summaryrefslogtreecommitdiffstats
path: root/debian/extract-config-opts
diff options
context:
space:
mode:
Diffstat (limited to 'debian/extract-config-opts')
-rwxr-xr-xdebian/extract-config-opts11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/extract-config-opts b/debian/extract-config-opts
new file mode 100755
index 00000000..3ca2d15a
--- /dev/null
+++ b/debian/extract-config-opts
@@ -0,0 +1,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 IFS=' ' read f p x; do
+ [ -n "$p" ] || p="*"
+ eval "case \$1 in ($p) echo \$f;; esac"
+done