Skip to content

Instantly share code, notes, and snippets.

@curtislinden
Created May 15, 2013 18:27
Show Gist options
  • Save curtislinden/5586157 to your computer and use it in GitHub Desktop.
Save curtislinden/5586157 to your computer and use it in GitHub Desktop.
dumb script to migrate jst.hamlc to hamlc
files = Dir["./app/assets/templates/**/*.jst.*"]
files.each do |file|
old_file = file
new_file = file.gsub("assets/templates","assets/javascripts/templates").gsub(".jst","")
dir = File.dirname(new_file)
puts "Creating directory for file"
`mkdir -p #{dir}`
puts "Copy #{old_file} into #{new_file}"
`cp -a #{old_file} #{new_file}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment