forked from ypid-bot/check_mk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_package_info
executable file
·31 lines (26 loc) · 998 Bytes
/
make_package_info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python
import sys, os, pprint
filelists = {}
package = {
"name" : "check_mk",
"title" : "Files shipped with Check_MK",
"description" :
"This package is automatically created during setup of Check_MK "
"and contains files shipped with the official release of Check_MK.",
"version" : sys.argv[1],
"version.packaged" : sys.argv[1],
"version.min_required" : sys.argv[1],
"author" : "Mathias Kettner",
"download_url" : "http://mathias-kettner.de/check_mk.html",
"files" : filelists
}
parts = [ "checks", "checkman", "agents", "web", "pnp-templates", "doc" ]
for part in parts:
tarfile = part + ".tar.gz"
filelist = []
filelists[part] = filelist
for fn in os.popen("tar tzf %s" % tarfile, "r"):
fn = fn.strip()
if not fn.endswith("/"):
filelist.append(fn)
sys.stdout.write(pprint.pformat(package))