From 020dd3b160f258c24fbf61d16ce85cd49f442f6b Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 19 Apr 2011 18:04:26 -0400 Subject: [PATCH] add update-cloneurls script for git server administration --- update-cloneurls | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 update-cloneurls diff --git a/update-cloneurls b/update-cloneurls new file mode 100755 index 0000000..a4a10be --- /dev/null +++ b/update-cloneurls @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import os + +repos = '/var/git/git/repositories' +base = 'git://holtrop.homelinux.com/' + +for d in os.listdir(repos): + repo_path = repos + '/' + d + if os.path.isdir(repo_path): + url_path = repo_path + '/cloneurl' + if not os.path.isfile(url_path): + f = file(url_path, 'w') + f.write(base + d)