summaryrefslogtreecommitdiffstats
path: root/scripts/opkg-query-helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/opkg-query-helper.py')
-rwxr-xr-xscripts/opkg-query-helper.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py
index fa6c44fa8b..2fb1a78970 100755
--- a/scripts/opkg-query-helper.py
+++ b/scripts/opkg-query-helper.py
@@ -28,6 +28,7 @@ import re
28 28
29archmode = False 29archmode = False
30filemode = False 30filemode = False
31vermode = False
31 32
32args = [] 33args = []
33for arg in sys.argv[1:]: 34for arg in sys.argv[1:]:
@@ -35,6 +36,8 @@ for arg in sys.argv[1:]:
35 archmode = True 36 archmode = True
36 elif arg == '-f': 37 elif arg == '-f':
37 filemode = True 38 filemode = True
39 elif arg == '-v':
40 vermode = True
38 else: 41 else:
39 args.append(arg) 42 args.append(arg)
40 43
@@ -60,6 +63,12 @@ for line in fileinput.input(args):
60 elif line.startswith("Architecture:"): 63 elif line.startswith("Architecture:"):
61 arch = line.split(": ")[1] 64 arch = line.split(": ")[1]
62 print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch)) 65 print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch))
66 elif vermode:
67 if line.startswith("Version:"):
68 ver = line.split(": ")[1]
69 elif line.startswith("Architecture:"):
70 arch = line.split(": ")[1]
71 print("%s %s %s" % (pkg,arch,ver))
63 else: 72 else:
64 if line.startswith("Depends:"): 73 if line.startswith("Depends:"):
65 depval = line.split(": ")[1] 74 depval = line.split(": ")[1]