lib/capitate/plugins/script.rb in capitate-0.2.2 vs lib/capitate/plugins/script.rb in capitate-0.2.3

- old
+ new

@@ -25,13 +25,13 @@ to_log = "" to_log = ">> #{options[:to_log]}" unless options[:to_log].blank? end run_all <<-CMDS - cd #{dir} && ./configure #{configure_options} #{to_log} - cd #{dir} && make #{to_log} - cd #{dir} && make install #{to_log} + sh -c "cd #{dir} && ./configure #{configure_options} #{to_log}" + sh -c "cd #{dir} && make #{to_log}" + sh -c "cd #{dir} && make install #{to_log}" CMDS end end # Download, unpack and yield (unpacked source director). @@ -114,11 +114,11 @@ http_get_method = fetch(:http_get_method, "wget -nv") run_all <<-CMDS mkdir -p #{dest} && cd #{dest} && #{http_get_method} #{url} - cd #{dest} && tar zxf #{file} + sh -c "cd #{dest} && tar zxf #{file}" CMDS if block_given? yield("#{dest}/#{unpack_dir}") run_via "rm -f #{dest}/#{file}" @@ -134,11 +134,11 @@ # +options+:: See invoke_command options # def run_all(cmds, options = {}, &block) cmds.split("\n").each do |cmd| cmd = cmd.gsub(/^\s+/, "") - sh_cmd = %{sh -c "#{cmd.gsub("\"", "\"\"")}"} - run_via(sh_cmd, options, &block) + #sh_cmd = %{sh -c "#{cmd.gsub("\"", "\"\"")}"} + run_via(cmd, options, &block) end end end \ No newline at end of file