diff options
author | Kali Kaneko <kali@leap.se> | 2015-01-15 17:21:01 -0400 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2015-02-13 14:03:12 -0300 |
commit | b226c1a3c44df3bfe9b888be1f8661a69f53a88b (patch) | |
tree | 6e8aa667e6a8e4c4bdcc938a1287ea7e04cc658a /pkg/scripts | |
parent | e52f9a239a146c06a0683e47eaf9d53f4deb332b (diff) |
gather bitmask dependency tree
Diffstat (limited to 'pkg/scripts')
-rwxr-xr-x | pkg/scripts/filter-bitmask-deps | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pkg/scripts/filter-bitmask-deps b/pkg/scripts/filter-bitmask-deps new file mode 100755 index 00000000..9808d394 --- /dev/null +++ b/pkg/scripts/filter-bitmask-deps @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +""" +Filter bitmask dependencies. + +Usage: pipdeptree | filter-bitmask-deps +""" +import fileinput + +TARGET = "leap.bitmask" + + +def get_bitmask_deps(dep_lines): + res = [] + begin = False + for dep in dep_lines: + if dep.startswith(TARGET): + begin = True + res.append(dep) + continue + elif dep.startswith(' ') and begin: + res.append(dep) + continue + if begin: + return res + + +if __name__ == "__main__": + lines = [] + for line in fileinput.input(): + lines.append(line) + + bitmask_deps = get_bitmask_deps(lines) + for line in bitmask_deps: + print line[:-1] |