diff options
Diffstat (limited to 'pkg/scripts')
-rwxr-xr-x | pkg/scripts/checkout_leap_versions.sh | 7 | ||||
-rwxr-xr-x | pkg/scripts/filter-bitmask-deps | 35 |
2 files changed, 42 insertions, 0 deletions
diff --git a/pkg/scripts/checkout_leap_versions.sh b/pkg/scripts/checkout_leap_versions.sh new file mode 100755 index 00000000..9d6c6fab --- /dev/null +++ b/pkg/scripts/checkout_leap_versions.sh @@ -0,0 +1,7 @@ +#!/bin/sh +cat pkg/leap_versions.txt | while read line +do + package=$(echo $line | cut -f1 -d' ') + tag=$(echo $line | cut -f2 -d' ') + cd ../$package && git checkout $tag +done 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] |