Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created February 20, 2014 05:14
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 dongyuwei/9107443 to your computer and use it in GitHub Desktop.
Save dongyuwei/9107443 to your computer and use it in GitHub Desktop.
rename all css to less
count = 0;
Dir["./src/main/webapp/assets/**/*.css"].each {|f|
# File.rename(f, f.downcase)
count = count + 1
system("git mv #{f} #{f.sub(/.css$/,'.less')}")
}
puts count
# find src/main/webapp/assets -name *.css|wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment