[Swift-commit] r3323 - SwiftApps/adem-osg/lib/adem
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon May 3 14:57:10 CDT 2010
Author: aespinosa
Date: 2010-05-03 14:57:10 -0500 (Mon, 03 May 2010)
New Revision: 3323
Modified:
SwiftApps/adem-osg/lib/adem/app.rb
Log:
changed app usage messages and added verbosity
Modified: SwiftApps/adem-osg/lib/adem/app.rb
===================================================================
--- SwiftApps/adem-osg/lib/adem/app.rb 2010-05-03 19:57:07 UTC (rev 3322)
+++ SwiftApps/adem-osg/lib/adem/app.rb 2010-05-03 19:57:10 UTC (rev 3323)
@@ -2,6 +2,7 @@
def app(args, conf)
options = {}
+ site_conf = nil
optparse = OptionParser.new do |opts|
opts.banner = "Usage: adem app [options]"
@@ -10,11 +11,16 @@
puts app_avail(conf[:pacman_cache]).grep /[(\ |\*)]/
end
- opts.on('-i', '--install PACKAGE', 'Package to install') do |package|
- puts "Installing #{package}"
- app_install package, conf
+ opts.on('-i', '--install PACKAGE', 'Install package') do |package|
+ puts "Installing #{package} on sites supporting the virtual organization #{conf[:virtual_organization]}"
+ site_conf = app_install package, conf
end
+ opts.on('-r', '--remove PACKAGE', 'Remove package') do |package|
+ puts "Removing #{package} on sites supporting the virtual organization #{conf[:virtual_organization]}"
+ site_conf = app_remove package, conf
+ end
+
opts.on_tail('-h', '--help', 'Show this help message') do
puts opts
exit
@@ -29,6 +35,7 @@
def app_deploy(app, conf)
conf[:sites].each do |site|
+ puts "Site #{site.key}"
path = "#{site[:app_directory]}/#{conf[:virtual_organization]}"
contact = site_fork site[:compute_element]
site[:pacman] = pacman_find(contact, path) if not site[:pacman]
@@ -40,6 +47,7 @@
package = "#{conf[:pacman_cache]}:#{app}"
pacman_install package, target
end
+ conf[:sites]
end
def site_fork(compute_element)
More information about the Swift-commit
mailing list