Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.815 kb
require 'rake'
desc 'Install the style into Application Support folder'
task :install do
directories = ['styles', 'unsupported']
targets = directories.map { |directory| "#{ENV['HOME']}/Library/Application Support/Propane/#{directory}" }
# Back up old files
targets.each do |directory|
# Only make back ups if these are originals (i.e. no backup exists already)
if File.exists?(directory) && !File.exists?("#{directory}.backup")
`mv "#{directory}" "#{directory}.backup"`
end
end
# Delete targets and copy new ones to it
targets.each do |directory|
FileUtils.rm_rf(directory) if File.exists?(directory)
end
directories.each do |directory|
target = "#{ENV['HOME']}/Library/Application Support/Propane/#{directory}"
`cp -R "$PWD/#{directory}" "#{target}"`
end
end
Jump to Line
Something went wrong with that request. Please try again.