OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 ## repo default configuration | 3 ## repo default configuration |
4 ## | 4 ## |
5 REPO_URL='https://git.chromium.org/git/external/repo' | 5 REPO_URL='https://chromium.googlesource.com/external/repo' |
6 REPO_REV='stable' | 6 REPO_REV='stable' |
7 | 7 |
8 # Copyright (C) 2008 Google Inc. | 8 # Copyright (C) 2008 Google Inc. |
9 # | 9 # |
10 # Licensed under the Apache License, Version 2.0 (the "License"); | 10 # Licensed under the Apache License, Version 2.0 (the "License"); |
11 # you may not use this file except in compliance with the License. | 11 # you may not use this file except in compliance with the License. |
12 # You may obtain a copy of the License at | 12 # You may obtain a copy of the License at |
13 # | 13 # |
14 # http://www.apache.org/licenses/LICENSE-2.0 | 14 # http://www.apache.org/licenses/LICENSE-2.0 |
15 # | 15 # |
16 # Unless required by applicable law or agreed to in writing, software | 16 # Unless required by applicable law or agreed to in writing, software |
17 # distributed under the License is distributed on an "AS IS" BASIS, | 17 # distributed under the License is distributed on an "AS IS" BASIS, |
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
19 # See the License for the specific language governing permissions and | 19 # See the License for the specific language governing permissions and |
20 # limitations under the License. | 20 # limitations under the License. |
21 | 21 |
22 magic='--calling-python-from-/bin/sh--' | 22 magic='--calling-python-from-/bin/sh--' |
23 """exec" python -E "$0" "$@" """#$magic" | 23 """exec" python -E "$0" "$@" """#$magic" |
24 if __name__ == '__main__': | 24 if __name__ == '__main__': |
25 import sys | 25 import sys |
26 if sys.argv[-1] == '#%s' % magic: | 26 if sys.argv[-1] == '#%s' % magic: |
27 del sys.argv[-1] | 27 del sys.argv[-1] |
28 del magic | 28 del magic |
29 | 29 |
30 # increment this whenever we make important changes to this script | 30 # increment this whenever we make important changes to this script |
31 VERSION = (1, 18) | 31 VERSION = (1, 18) |
32 | 32 |
33 # increment this if the MAINTAINER_KEYS block is modified | 33 # increment this if the MAINTAINER_KEYS block is modified |
34 KEYRING_VERSION = (1,1) | 34 KEYRING_VERSION = (1,2) |
35 MAINTAINER_KEYS = """ | 35 MAINTAINER_KEYS = """ |
36 | 36 |
37 Repo Maintainer <repo@android.kernel.org> | 37 Repo Maintainer <repo@android.kernel.org> |
38 -----BEGIN PGP PUBLIC KEY BLOCK----- | 38 -----BEGIN PGP PUBLIC KEY BLOCK----- |
39 Version: GnuPG v1.4.2.2 (GNU/Linux) | 39 Version: GnuPG v1.4.2.2 (GNU/Linux) |
40 | 40 |
41 mQGiBEj3ugERBACrLJh/ZPyVSKeClMuznFIrsQ+hpNnmJGw1a9GXKYKk8qHPhAZf | 41 mQGiBEj3ugERBACrLJh/ZPyVSKeClMuznFIrsQ+hpNnmJGw1a9GXKYKk8qHPhAZf |
42 WKtrBqAVMNRLhL85oSlekRz98u41H5si5zcuv+IXJDF5MJYcB8f22wAy15lUqPWi | 42 WKtrBqAVMNRLhL85oSlekRz98u41H5si5zcuv+IXJDF5MJYcB8f22wAy15lUqPWi |
43 VCkk1l8qqLiuW0fo+ZkPY5qOgrvc0HW1SmdH649uNwqCbcKb6CxaTxzhOwCgj3AP | 43 VCkk1l8qqLiuW0fo+ZkPY5qOgrvc0HW1SmdH649uNwqCbcKb6CxaTxzhOwCgj3AP |
44 xI1WfzLqdJjsm1Nq98L0cLcD/iNsILCuw44PRds3J75YP0pze7YF/6WFMB6QSFGu | 44 xI1WfzLqdJjsm1Nq98L0cLcD/iNsILCuw44PRds3J75YP0pze7YF/6WFMB6QSFGu |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 z0AAu28Mj+12g2WwePRz6gfM9rHtI37ylYW3oT/9M9mO9ei/Bc/1D7Dz6qNV+0vg | 100 z0AAu28Mj+12g2WwePRz6gfM9rHtI37ylYW3oT/9M9mO9ei/Bc/1D7Dz6qNV+0vg |
101 uSVJxM2Bl6GalHPZLhHntFEdIA6EdoUAEQEAAYkBHwQYAQIACQUCUGIs/AIbDAAK | 101 uSVJxM2Bl6GalHPZLhHntFEdIA6EdoUAEQEAAYkBHwQYAQIACQUCUGIs/AIbDAAK |
102 CRAZJpRVM4hxpNfkB/0W/hP5WK/NETXBlWXXW7JPaWO2c5kGwD0lnj5RRmridyo1 | 102 CRAZJpRVM4hxpNfkB/0W/hP5WK/NETXBlWXXW7JPaWO2c5kGwD0lnj5RRmridyo1 |
103 vbm5PdM91jOsDQYqRu6YOoYBnDnEhB2wL2bPh34HWwwrA+LwB8hlcAV2z1bdwyfl | 103 vbm5PdM91jOsDQYqRu6YOoYBnDnEhB2wL2bPh34HWwwrA+LwB8hlcAV2z1bdwyfl |
104 3R823fReKN3QcvLHzmvZPrF4Rk97M9UIyKS0RtnfTWykRgDWHIsrtQPoNwsXrWoT | 104 3R823fReKN3QcvLHzmvZPrF4Rk97M9UIyKS0RtnfTWykRgDWHIsrtQPoNwsXrWoT |
105 9LrM2v+1+9mp3vuXnE473/NHxmiWEQH9Ez+O/mOxQ7rSOlqGRiKq/IBZCfioJOtV | 105 9LrM2v+1+9mp3vuXnE473/NHxmiWEQH9Ez+O/mOxQ7rSOlqGRiKq/IBZCfioJOtV |
106 fTQeIu/yASZnsLBqr6SJEGwYBoWcyjG++k4fyw8ocOAo4uGDYbxgN7yYfNQ0OH7o | 106 fTQeIu/yASZnsLBqr6SJEGwYBoWcyjG++k4fyw8ocOAo4uGDYbxgN7yYfNQ0OH7o |
107 V6pfUgqKLWa/aK7/N1ZHnPdFLD8Xt0Dmy4BPwrKC | 107 V6pfUgqKLWa/aK7/N1ZHnPdFLD8Xt0Dmy4BPwrKC |
108 =O7am | 108 =O7am |
109 -----END PGP PUBLIC KEY BLOCK----- | 109 -----END PGP PUBLIC KEY BLOCK----- |
| 110 |
| 111 Stefan Zager <szager@chromium.org> |
| 112 -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 113 Version: GnuPG v1.4.11 (GNU/Linux) |
| 114 |
| 115 mQINBFIJOcgB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DIjcKC2pzKQkm6HbWgW4wA9gCh1TRki8FP |
| 131 LMv1Fu/dr13STCR9P2evsTRZ+ZSJhTSboHNHeEAJGiGZQAsN94oht7647lYj+AyR |
| 132 ThzyHDMXXiDr8jPJIkyRilY+y82bCOatOfPoCkce3VI+LRUGJ19hJY01m4RRneIE |
| 133 55l7fXR3zggcsONjV5b+oLcGQPGgX9w64BJ7khT7Wb9+kuyrdJBIBzJsaACFEbri |
| 134 pPi02FS/HahYpLC3J66REAeNyofgVXau6WQsHrHMGsBTL9aAr0nrCrkF4Nyyc2Jd |
| 135 do6nYuljuUhORqbEECmmBM2eBtkL6Ac92D6WMBIwBOC5tCNHO2YFIvi8Y8EuE8sc |
| 136 1zB5U5Ai4SIu2icRAhzAhCRaUq02cMWuELKH6Vuh9nzgEefFWty6vPbKEyZLu19D |
| 137 B80aqP1cTN88FjtKQ/eTF29TUB6AefUeBS17e2e3WUMy4nc8tduuOFYfiHP40ScP |
| 138 wOoatwfzpiTIPGbocUEPL+pS0O/Xy8SINxFMCud3zA== |
| 139 =Vd2S |
| 140 -----END PGP PUBLIC KEY BLOCK----- |
110 """ | 141 """ |
111 | 142 |
112 GIT = 'git' # our git command | 143 GIT = 'git' # our git command |
113 MIN_GIT_VERSION = (1, 5, 4) # minimum supported git version | 144 MIN_GIT_VERSION = (1, 5, 4) # minimum supported git version |
114 repodir = '.repo' # name of repo's private directory | 145 repodir = '.repo' # name of repo's private directory |
115 S_repo = 'repo' # special repo repository | 146 S_repo = 'repo' # special repo repository |
116 S_manifests = 'manifests' # special manifest repository | 147 S_manifests = 'manifests' # special manifest repository |
117 REPO_MAIN = S_repo + '/main.py' # main script | 148 REPO_MAIN = S_repo + '/main.py' # main script |
118 | 149 |
119 | 150 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 for name in files: | 742 for name in files: |
712 os.remove(os.path.join(root, name)) | 743 os.remove(os.path.join(root, name)) |
713 for name in dirs: | 744 for name in dirs: |
714 os.rmdir(os.path.join(root, name)) | 745 os.rmdir(os.path.join(root, name)) |
715 os.rmdir(repodir) | 746 os.rmdir(repodir) |
716 sys.exit(1) | 747 sys.exit(1) |
717 repo_main, rel_repo_dir = _FindRepo() | 748 repo_main, rel_repo_dir = _FindRepo() |
718 else: | 749 else: |
719 _NoCommands(cmd) | 750 _NoCommands(cmd) |
720 | 751 |
| 752 if cmd == 'sync' and NeedSetupGnuPG(): |
| 753 SetupGnuPG(False) |
| 754 |
721 if my_main: | 755 if my_main: |
722 repo_main = my_main | 756 repo_main = my_main |
723 | 757 |
724 ver_str = '.'.join(map(lambda x: str(x), VERSION)) | 758 ver_str = '.'.join(map(lambda x: str(x), VERSION)) |
725 me = [repo_main, | 759 me = [repo_main, |
726 '--repo-dir=%s' % rel_repo_dir, | 760 '--repo-dir=%s' % rel_repo_dir, |
727 '--wrapper-version=%s' % ver_str, | 761 '--wrapper-version=%s' % ver_str, |
728 '--wrapper-path=%s' % wrapper_path, | 762 '--wrapper-path=%s' % wrapper_path, |
729 '--'] | 763 '--'] |
730 me.extend(orig_args) | 764 me.extend(orig_args) |
731 me.extend(extra_args) | 765 me.extend(extra_args) |
732 try: | 766 try: |
733 os.execv(repo_main, me) | 767 os.execv(repo_main, me) |
734 except OSError as e: | 768 except OSError as e: |
735 print >>sys.stderr, "fatal: unable to start %s" % repo_main | 769 print >>sys.stderr, "fatal: unable to start %s" % repo_main |
736 print >>sys.stderr, "fatal: %s" % e | 770 print >>sys.stderr, "fatal: %s" % e |
737 sys.exit(148) | 771 sys.exit(148) |
738 | 772 |
739 | 773 |
740 if __name__ == '__main__': | 774 if __name__ == '__main__': |
741 main(sys.argv[1:]) | 775 main(sys.argv[1:]) |
OLD | NEW |