aboutsummaryrefslogtreecommitdiff
path: root/grok-cron.py
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-04-06 16:06:20 -0500
committerAndy Doan <andy.doan@linaro.org>2015-04-06 16:06:20 -0500
commit24727a51034823a9edb08d0cd033f0c8d68e91ce (patch)
tree96e15726fa965986d550f08542e60fffd6a435c7 /grok-cron.py
parent71c06f9301c5e69abd0643a887fc7c7aec5d6728 (diff)
grok: support android git which doesn't use the export file
Change-Id: Ia1987f1d40a0fb062fda25c4d738e1873ba714ba
Diffstat (limited to 'grok-cron.py')
-rwxr-xr-xgrok-cron.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/grok-cron.py b/grok-cron.py
index 997eb5a..b4ed9bf 100755
--- a/grok-cron.py
+++ b/grok-cron.py
@@ -11,7 +11,7 @@ logging.basicConfig(level=logging.INFO)
log = logging.getLogger('grok-cron')
-def main(manifile, repo_dir, dryrun):
+def main(manifile, repo_dir, no_check_export, dryrun):
# uses advisory lock, so its safe even if we die unexpectedly
grokmirror.manifest_lock(manifile)
@@ -27,7 +27,8 @@ def main(manifile, repo_dir, dryrun):
g = os.path.join(repo_dir, repo)
gde = os.path.join(g, 'git-daemon-export-ok')
- if not os.path.exists(g) or not os.path.exists(gde):
+ if not os.path.exists(g) or \
+ (not no_check_export and not os.path.exists(gde)):
log.info("Removing %s from manifest...", repo)
del manifest[repo]
changed = True
@@ -45,6 +46,8 @@ if __name__ == '__main__':
help='grok manifest file')
parser.add_argument('-t', '--toplevel', required=True,
help='location of repositories')
+ parser.add_argument('--no-check-export', action='store_true',
+ help='git-daemon-export-ok file not required')
parser.add_argument('-n', '--dryrun', action='store_true',
help='Make no changes to manifest')
parser.add_argument('--log', default='WARN',
@@ -55,4 +58,4 @@ if __name__ == '__main__':
for l in logging.getLogger().manager.loggerDict.keys():
logging.getLogger(l).setLevel(getattr(logging, args.log))
- main(args.manifest, args.toplevel, args.dryrun)
+ main(args.manifest, args.toplevel, args.no_check_export, args.dryrun)