-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
34 lines (25 loc) · 1006 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
task :install, :octo_location do |t, args|
octo_location = args[:octo_location]
#copy aside html into ../source/_includes/custom/asides/
FileUtils.cp 'treehousebadges.html', "#{octo_location}/source/_includes/custom/asides/treehousebadges.html"
#copy jquery into ../source/_includes/custom/after_footer.html
js_file = File.open("treehousebadges.js", "r").readlines
File.open("#{octo_location}/source/_includes/custom/after_footer.html", "a+") do |f|
js_file.each do |line|
f.write line
end
end
#copy sass into ../sass/custom/_styles.scss
sass_file = File.open("treehousebadgesstyles.scss", "r").readlines
File.open("#{octo_location}/sass/custom/_styles.scss", "a+") do |f|
sass_file.each do |line|
f.write line
end
end
File.open("#{octo_location}/_config.yml", "a+") do |f|
f.write "\n\# Treehouse Badges for Octopress widget
\nth_username:
\nth_show_all_badges:
\nth_number_badges_visible:"
end
end