Skip to content

Commit

Permalink
fixed bug in unpacking zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwb committed Mar 1, 2012
1 parent 2468034 commit 710c3e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions ark/resources/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def unzip_cmd
require 'tmpdir'
tmpdir = Dir.mktmpdir
system("unzip -q -u -o '#{r.release_file}' -d '#{tmpdir}'")
subdirectory = Dir.glob(tmpdir + "/**")[0]
subdirectory_children = Dir.glob(subdirectory + "/**")
subdirectory_children = Dir.glob("#{tmpdir}/**")
FileUtils.mv subdirectory_children, r.install_dir
FileUtils.rm_rf tmpdir
elsif r.junk_paths
Expand All @@ -173,7 +172,7 @@ def untar_cmd(sub_cmd)
else
strip_argument = ""
end
system(%Q{tar '#{sub_cmd}' '#{r.release_file}' '#{strip_argument}' -C '#{install_dir}';})
system(%Q{tar '#{sub_cmd}' '#{r.release_file}' '#{strip_argument}' -C '#{r.install_dir}';})
FileUtils.chown_R r.user, r.user, r.install_dir
}
end
Expand Down
14 changes: 7 additions & 7 deletions jira/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
owner jira_user
end

# ark "additional jars" do
# release_url node['jira']['jars_url']
# install_dir "#{t.base}/webapps/ROOT/webapp/WEB-INF/lib"
# user jira_user
# stop_file "commons-logging-1.1.1.jar"
# no_symlink true
# end
ark "additional_jars" do
release_url node['jira']['jars_url']
install_dir "#{t.base}/webapps/ROOT/webapp/WEB-INF/lib"
user jira_user
stop_file "commons-logging-1.1.1.jar"
no_symlink true
end
3 changes: 0 additions & 3 deletions tomcat/resources/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
attribute :more_opts, :kind_of => Array, :default => []
attribute :user, :kind_of => String, :required => true



# we have to set default for the supports attribute
# in initializer since it is a 'reserved' attribute name
def initialize(*args)
Expand All @@ -48,6 +46,5 @@ def initialize(*args)
@action = :install
catalina_parent = Pathname.new(node['tomcat']['home']).parent.to_s
@base = "#{catalina_parent}/#{@name}"
Chef::Log.debug("base_is #{@base}")
@supports = {:report => true, :exception => true}
end

0 comments on commit 710c3e5

Please sign in to comment.