2件ヒット
[1-2件を表示]
(0.020秒)
検索結果
-
Kernel
# file(*args) { . . . } -> Rake :: FileTask (63025.0) -
ファイルタスクを定義します。
...ル名を指定します。
例:
file "config.cfg" => ["config.template"] do
open("config.cfg", "w") do |outfile|
open("config.template") do |infile|
while line = infile.gets
outfile.puts line
end
end
end
end
@see Rake::Task.define_task... -
FileUtils
# sh(*cmd) {|result , status| . . . } (79.0) -
与えられたコマンドを実行します。
与えられたコマンドを実行します。
与えられた引数が複数の場合、シェルを経由しないでコマンドを実行します。
@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #...