Skip to content

Commit

Permalink
(MCO-763) Move prepare_installation to run first
Browse files Browse the repository at this point in the history
prepare_installation does not depend on any variable definitions before it, so
it needs to be moved to the first action taken in install.rb to avoid
situations where the script is using install options before they are defined
  • Loading branch information
mcdonaldseanp committed May 19, 2016
1 parent 656cc44 commit ef83cfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.rb
Expand Up @@ -296,6 +296,7 @@ def install_binfile(from, op_file, target)

# Change directory into the mcollective root so we don't get the wrong files for install.
cd File.dirname(__FILE__) do
prepare_installation
# Set these values to what you want installed.
configs = glob(%w{etc/*.dist})
erbs = glob(%w{etc/*.erb})
Expand All @@ -304,6 +305,7 @@ def install_binfile(from, op_file, target)
rdoc = glob(%w{bin/* lib/**/*.rb README* })
libs = glob(%w{lib/**/*})
plugins = glob(%w{plugins/**/*})

if WINDOWS && InstallOptions.batch_files
if InstallOptions.service_files
windows_bins = glob(%w{ext/windows/*.bat ext/windows/*.rb})
Expand All @@ -313,8 +315,6 @@ def install_binfile(from, op_file, target)
end

check_prereqs
prepare_installation

build_rdoc(rdoc) if InstallOptions.rdoc
do_configs(configs, InstallOptions.configdir, 'etc/|\.dist') if InstallOptions.configs
do_configs(erbs, InstallOptions.configdir) if InstallOptions.configs
Expand Down

0 comments on commit ef83cfb

Please sign in to comment.