Last active
July 11, 2016 01:57
-
-
Save BrentonEarl/ea07553b404ed8a4ef81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse, os, subprocess | |
parser = argparse.ArgumentParser() | |
parser.add_argument("directory", help="The repository directory - /var/lib/sbopkg/{SBo,SBo-git}/") | |
parser.add_argument("maintainer", help="Supply SlackBuilds maintainer in quotes") | |
args = parser.parse_args() | |
for root, dirs, files in os.walk(args.directory): | |
for file in files: | |
if file.endswith(".info"): | |
list = os.path.join(root,file) | |
with open(list, "r") as f: | |
for line in f: | |
if args.maintainer in line: | |
print(os.path.dirname(list)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output on Slackware 14.2