python: Fix build issues when using "make build_cached"
[omd.git] / packages / shinken / merge-shinken-specific-config
blobaea760e6918a5912e110ecbefc4b768c5abdb98b
1 #!/usr/bin/python
3 import sys
5 sys.stdout.write("""#
6 # This file has been created by OMD out of the following files:
8 """)
10 for fn in sys.argv[1:]:
11 sys.stdout.write("# %s\n" % fn)
13 sys.stdout.write("""#
14 # Do not edit this file. It will be recreated each time Nagios
15 # is started or reloaded. Rather change things in the original
16 # files.
18 # ------------------------------------------------------------
20 """)
22 for fn in sys.argv[1:]:
23 sys.stdout.write("# %s\n" % fn)
24 lineno = 0
25 for line in file(fn):
26 lineno += 1
27 ls = line.strip()
28 if ls == "" or ls.startswith("#"):
29 continue
30 sys.stdout.write(line)