33: def sh(*cmd, &block)
34: options = (Hash === cmd.last) ? cmd.pop : {}
35: shell_runner = block_given? ? block : create_shell_runner(cmd)
36: set_verbose_option(options)
37: options[:noop] ||= Rake::FileUtilsExt.nowrite_flag
38: Rake.rake_check_options options, :noop, :verbose
39: Rake.rake_output_message cmd.join(" ") if options[:verbose]
40:
41: unless options[:noop]
42: res = rake_system(*cmd)
43: status = $?
44: status = PseudoStatus.new(1) if !res && status.nil?
45: shell_runner.call(res, status)
46: end
47: end