Recursive wildcards in Rake?

允我心安 提交于 2019-12-06 15:38:56

The best I've come up with so far looks like this:

FLAC_FILES = FileList['flac/**/*.flac']

FLAC_FILES.each do |flac|
  mp3 = flac.pathmap("%{^flac,mp3}X.mp3")
  file mp3 => flac do
    puts "Converting #{flac} to #{mp3}"
  end
  task :default => mp3
end

Critique, anyone?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!