LEFT | RIGHT |
1 from __future__ import print_function | 1 from __future__ import print_function |
2 | 2 |
3 import os | 3 import os |
4 import urllib | 4 import urllib |
5 import zipfile | 5 import zipfile |
6 import sys | 6 import sys |
7 import shutil | 7 import shutil |
8 | 8 |
9 | 9 |
10 def main(argv): | 10 def main(argv): |
(...skipping 25 matching lines...) Expand all Loading... |
36 for info in zf.infolist(): | 36 for info in zf.infolist(): |
37 zf.extract(info.filename, path=libadblockplus_third_party) | 37 zf.extract(info.filename, path=libadblockplus_third_party) |
38 out_path = os.path.join(libadblockplus_third_party, info.filename) | 38 out_path = os.path.join(libadblockplus_third_party, info.filename) |
39 | 39 |
40 perm = info.external_attr >> 16L | 40 perm = info.external_attr >> 16L |
41 os.chmod(out_path, perm) | 41 os.chmod(out_path, perm) |
42 | 42 |
43 # Delete zip | 43 # Delete zip |
44 os.remove(ndk_dst) | 44 os.remove(ndk_dst) |
45 | 45 |
46 return 0 | |
47 | |
48 | 46 |
49 if __name__ == '__main__': | 47 if __name__ == '__main__': |
50 try: | 48 try: |
51 sys.exit(main(sys.argv[1:])) | 49 main(sys.argv[1:]) |
52 except KeyboardInterrupt: | 50 except KeyboardInterrupt: |
53 sys.exit('interrupted') | 51 sys.exit('interrupted') |
LEFT | RIGHT |