Mercurial > hg > aboriginal
comparison sources/toys/filter.py @ 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 | |
children |
comparison
equal
deleted
inserted
replaced
1403:42698b9646c2 | 1404:f24c0deeed24 |
---|---|
1 #!/usr/bin/python | |
2 | |
3 # Filter out baseconfig entries from output of miniconfig.sh | |
4 | |
5 import os,sys | |
6 | |
7 if len(sys.argv) != 3: | |
8 sys.stderr.write("usage: filter.py baseconfig mini.config\n") | |
9 sys.exit(1) | |
10 | |
11 baseconfig=file(sys.argv[1]).readlines() | |
12 miniconfig=file(sys.argv[2]).readlines() | |
13 | |
14 for i in baseconfig: | |
15 if i in miniconfig: | |
16 miniconfig.remove(i) | |
17 | |
18 print "".join(miniconfig), |