summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorMark E. Hamilton <mhamilt@sandia.gov>2016-02-03 15:49:43 -0700
committerMark E. Hamilton <mhamilt@sandia.gov>2016-02-09 17:27:29 -0700
commit55536286019c5c85314ea8a309a09c13976fac9a (patch)
tree972106d82dd3a2186d393c0ca06dd9812a5991b2 /repo
parent5ed805a98ed06b1d2ca275e244a2aee1673ead0d (diff)
downloadgit-repo-55536286019c5c85314ea8a309a09c13976fac9a.tar.gz
repo: Add check of REPO_URL env variable
We want to be able to run repo on a system that is not connected to the Internet and cannot access https://gerrit.googlesource.com. We can put a clone of that repos there, but would prefer to use the stable version of the repo script instead of a locally modified version. This commit adds a check for the REPO_URL environment variable. If that is set and not empty its value will be set in the REPO_URL global in repo. Otherwise the standard path will be used. Change-Id: I0616f5f81ef75f3463b73623b892cb5eed6bb7ba
Diffstat (limited to 'repo')
-rwxr-xr-xrepo6
1 files changed, 4 insertions, 2 deletions
diff --git a/repo b/repo
index d1c5427f..6ebfcd92 100755
--- a/repo
+++ b/repo
@@ -2,7 +2,10 @@
2 2
3## repo default configuration 3## repo default configuration
4## 4##
5REPO_URL = 'https://gerrit.googlesource.com/git-repo' 5import os
6REPO_URL = os.environ.get('REPO_URL', None)
7if not REPO_URL:
8 REPO_URL = 'https://gerrit.googlesource.com/git-repo'
6REPO_REV = 'stable' 9REPO_REV = 'stable'
7 10
8# Copyright (C) 2008 Google Inc. 11# Copyright (C) 2008 Google Inc.
@@ -114,7 +117,6 @@ GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
114 117
115import errno 118import errno
116import optparse 119import optparse
117import os
118import re 120import re
119import shutil 121import shutil
120import stat 122import stat