Changeset 761 for server/fedora/config
- Timestamp:
- Jun 3, 2008, 1:23:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/fedora/config/gems.py
r204 r761 4 4 Joe Presbrey <presbrey@mit.edu""" 5 5 6 import commands, re 6 import commands, re, sys 7 7 8 8 def scripts_gems(): 9 cout = commands.getoutput('gem list --local') 10 return re.findall('([^\s]+)\s\([0-9\.]+\)', cout) 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)) 11 12 12 13 if __name__ == "__main__": 13 for x in gems_local(): 14 if x == 'sources': continue 15 print x 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 TracChangeset
for help on using the changeset viewer.