Created
June 18, 2021 23:03
-
-
Save obfusk/c1e8e0cd3867a237ea932f6792739c11 to your computer and use it in GitHub Desktop.
fix fdroid apkcache timestamps
This file contains hidden or 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/python3 | |
| import collections, glob, json, os | |
| with open("tmp/apkcache.json") as f: | |
| apkcache = json.load(f, object_pairs_hook=collections.OrderedDict) | |
| for apk in glob.glob("repo/*.apk"): | |
| mtime = os.stat(apk).st_mtime | |
| apkcache[os.path.basename(apk)]["added"] = mtime | |
| with open("tmp/apkcache.json", "w") as f: | |
| json.dump(apkcache, f, indent=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment