lib/rconf/support/package_installer.rb in rconf-0.9.18 vs lib/rconf/support/package_installer.rb in rconf-0.9.19
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
+# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited. Any use of this program by an authorized
@@ -25,11 +25,11 @@
# opts[:report](TrueClass|FalseClass):: Whether to report installation
#
# === Block
# If a block is given it will get called with no argument prior to the
# packages being installed. If the block returns true then installation
- # will proceed otherwise it won't. Use the block to check whether
+ # will proceed otherwise it won't. Use the block to check whether
# installation is required or whether the packages are already installed.
# If no block is given then installation will always occur.
#
# === Return
# true:: Always return true
@@ -56,12 +56,12 @@
# Install debian packages
#
# === Return
# true:: Always return true
def install_linux_ubuntu(packages, opts)
- return if packages.nil?
- args = packages.dup
+ return if packages.nil?
+ args = packages.dup
args << opts if opts
Command.sudo('apt-get', 'install', '-y', *args)
end
alias :install_linux_debian :install_linux_ubuntu
@@ -69,11 +69,11 @@
#
# === Return
# true:: Always return true
def install_linux_centos(packages, opts)
return if packages.nil?
- args = packages.dup
+ args = packages.dup
args << opts if opts
Command.sudo('yum', 'install', '-y', *args)
end
alias :install_linux_redhat :install_linux_centos
@@ -90,10 +90,10 @@
res = Command.execute('brew', 'install', *args)
installed = res.success? && res.output !~ /Formula already installed/
Command.sudo('brew', 'link', p) if installed
end
end
-
+
# Install Windows software
#
# === Return
# true:: Always return true
def install_windows(packages, opts)