Merge branch 'master' of git+ssh://git.fedorahosted.org//git/fedora-infrastructure
This commit is contained in:
commit
6f95b46870
1 changed files with 23 additions and 0 deletions
23
scripts/createReleases/createReleases.py
Normal file
23
scripts/createReleases/createReleases.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
|
||||
dirs = ['/git/',
|
||||
'/hg/',
|
||||
'/svn/',
|
||||
'/bzr/',
|
||||
'/mtn/',]
|
||||
|
||||
for dir in dirs:
|
||||
projects = os.listdir(dir)
|
||||
for project in projects:
|
||||
path = "%s%s" % (dir, project)
|
||||
release = "/srv/web/releases/%s" % project
|
||||
if not os.path.islink(path):
|
||||
stat = os.lstat(path)
|
||||
print "%s %s" % (project, stat.st_gid)
|
||||
if not os.path.isdir(release):
|
||||
os.makedirs(release)
|
||||
if os.lstat(release).st_gid != stat.st_gid:
|
||||
os.chown(release, -1, stat.st_gid)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue