Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sugamasao/365536 to your computer and use it in GitHub Desktop.
Save sugamasao/365536 to your computer and use it in GitHub Desktop.
# 特定の拡張子のファイルパスだけ抜き出す
target_ext = ['mxml', 'xml', 'as', 'txt', 'html']
target_file = []
Dir.glob("**/*").each do |f|
target_ext.each do |t|
target_file.push(f) if f =~ /.+\.#{t}$/
end
end
target_file.each do |ft|
puts 'svn propset svn:mime-type text/plain;charset=utf-8 ' + ft
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment