-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetlatest.py
executable file
·48 lines (39 loc) · 1.3 KB
/
getlatest.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
import json
import sys
img = sys.argv[1]
arch = sys.argv[2]
flavour = sys.argv[3]
if (img == "system"):
if ( flavour == "VANILLA"):
with open('waydroid_OTA/system/lineage/waydroid_%s/VANILLA.json' % arch) as json_file:
data = json.load(json_file)
for p in data['response']:
last=p
break
print(last["url"])
elif ( flavour == "GAPPS"):
with open('waydroid_OTA/system/lineage/waydroid_%s/GAPPS.json' % arch) as json_file:
data = json.load(json_file)
for p in data['response']:
last=p
break
print(last["url"])
elif ( flavour == "FOSS"):
with open('waydroid_OTA/system/lineage/waydroid_%s/FOSS.json' % arch) as json_file:
data = json.load(json_file)
for p in data['response']:
last=p
break
print(last["url"])
elif (img == "vendor"):
if (arch == 'x86_64'):
halium_ver = "MAINLINE"
else:
halium_ver = sys.argv[3]
with open('waydroid_OTA/vendor/waydroid_%s/%s.json' % (arch, halium_ver)) as json_file:
data = json.load(json_file)
for p in data['response']:
last=p
break
print(last["url"])