Skip to content

Instantly share code, notes, and snippets.

@avishai
Created June 5, 2012 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avishai/2874375 to your computer and use it in GitHub Desktop.
Save avishai/2874375 to your computer and use it in GitHub Desktop.
Flip CSS files using the R2 utility
#!/usr/bin/ruby
files = Dir.glob("app/assets/stylesheets/*.css")
for file in files do
next if file.match(".rtl.css")
output_file=file.gsub(".css", ".rtl.css")
puts "Flipping #{file} => #{output_file}"
`r2 #{file} #{output_file}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment