Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Issue#26 switched extract from unzip to jar xvf
Browse files Browse the repository at this point in the history
Signed-off-by: Stuart Stephen <[email protected]>
  • Loading branch information
mrswadge committed Sep 20, 2018
1 parent fc79a15 commit dd7e6ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fmw_opatch/providers/fmw_extract_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def load_current_resource
@current_resource.tmp_dir(@new_resource.tmp_dir)
@current_resource.version(@new_resource.version)
@current_resource.middleware_home_dir(@new_resource.middleware_home_dir)
@current_resource.java_home_dir(@new_resource.java_home_dir)

@current_resource.exists = true if ::File.exist?("#{@new_resource.tmp_dir}/#{@new_resource.name}")

Expand All @@ -33,16 +34,8 @@ def load_current_resource
else
converge_by("Create resource #{ @new_resource }") do

if @new_resource.version == '10.3.6'
path = "#{@new_resource.middleware_home_dir}\\wlserver_10.3\\server\\adr"
elsif new_resource.version == '12.1.1'
path = "#{@new_resource.middleware_home_dir}\\wlserver_12.1\\server\\adr"
else
path = "#{@new_resource.middleware_home_dir}\\oracle_common\\adr"
end

execute "extract #{new_resource.name} file" do
command "#{path}\\unzip.exe -o #{new_resource.source_file} -d #{new_resource.tmp_dir}"
command "#{new_resource.java_home_dir}\\bin\\jar.exe xvf #{new_resource.source_file}"
cwd new_resource.tmp_dir
end

Expand Down
1 change: 1 addition & 0 deletions fmw_opatch/recipes/weblogic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
os_group node['fmw']['os_group'] if ['solaris2', 'linux'].include?(node['os'])
tmp_dir node['fmw']['tmp_dir']
middleware_home_dir node['fmw']['middleware_home_dir'] if node['os'].include?('windows')
java_home_dir node['fmw']['java_home_dir'] if node['os'].include?('windows')
version node['fmw']['version'] if node['os'].include?('windows')
end

Expand Down
2 changes: 2 additions & 0 deletions fmw_opatch/resources/fmw_extract_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
attribute :version, kind_of: String, required: true
# middleware home path
attribute :middleware_home_dir, kind_of: String, required: true
# Java home folder
attribute :java_home_dir, kind_of: String, required: true
# Opatch source file
attribute :source_file, kind_of: String, required: true
# tmp folder
Expand Down

0 comments on commit dd7e6ad

Please sign in to comment.