Last change
on this file since 1507 was
761,
checked in by presbrey, 16 years ago
|
gem replication install script
|
-
Property svn:executable set to
*
|
File size:
540 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | """Retrieve local ruby gem list from scripts.mit.edu |
---|
3 | |
---|
4 | Joe Presbrey <presbrey@mit.edu""" |
---|
5 | |
---|
6 | import commands, re, sys |
---|
7 | |
---|
8 | def scripts_gems(): |
---|
9 | o = commands.getoutput('gem list --local') |
---|
10 | return map(lambda x: len(x) > 1 and (x[0], x[1].split(', ')) or x, |
---|
11 | re.findall('([^\s]+)\s\(([^\)]+)\)', o)) |
---|
12 | |
---|
13 | if __name__ == "__main__": |
---|
14 | for x in scripts_gems(): |
---|
15 | if x[0] == 'sources': continue |
---|
16 | #print >>sys.stderr, x |
---|
17 | for y in x[1]: |
---|
18 | print 'gem install %s --version %s -y' % (x[0], y) |
---|
Note: See
TracBrowser
for help on using the repository browser.