changeset 1404:f24c0deeed24

Add quick and dirty toy to filter out baseconfig entries from miniconfig.sh output to give LINUX_CONFIG entry for a target settings file.
author Rob Landley <rob@landley.net>
date Mon, 27 Jun 2011 07:44:19 -0500
parents 42698b9646c2
children f46279a3a48a
files sources/toys/filter.py
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/toys/filter.py	Mon Jun 27 07:44:19 2011 -0500
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+
+# Filter out baseconfig entries from output of miniconfig.sh
+
+import os,sys
+
+if len(sys.argv) != 3:
+  sys.stderr.write("usage: filter.py baseconfig mini.config\n")
+  sys.exit(1)
+
+baseconfig=file(sys.argv[1]).readlines()
+miniconfig=file(sys.argv[2]).readlines()
+
+for i in baseconfig:
+  if i in miniconfig:
+    miniconfig.remove(i)
+
+print "".join(miniconfig),