view sources/toys/filter.py @ 1458:60f1087591ac

Add ability to specify a package to rebuild to build.sh with REBUILD= (and then dependencies take it from there to the system image).
author Rob Landley <rob@landley.net>
date Thu, 20 Oct 2011 02:02:10 -0500
parents f24c0deeed24
children
line wrap: on
line source

#!/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),