-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
28 lines (24 loc) · 815 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
task :default do
build_dir = "build/Syntax Highlighter.safariextension"
FileUtils.rm_rf( build_dir )
FileUtils.mkdir_p( build_dir )
assets = [
"etc/Info.plist",
"etc/Settings.plist",
"src/*",
["lib/js-beautify/beautify.js", "lib/js-beautify"],
["lib/js-beautify/unpackers/*", "lib/js-beautify/unpackers"],
["lib/google-code-prettify/src/prettify.*", "lib/google-code-prettify"],
["lib/google-code-prettify/src/lang-*", "lib/google-code-prettify"]
]
assets.each do |glob|
( glob, dest_dir ) = glob if glob.is_a?( Array )
dest_dir ||= "."
Dir.glob( glob ).each do |src|
puts "linking #{src}"
dest = "#{build_dir}/#{dest_dir}/#{File.basename( src )}"
FileUtils.mkdir_p( File.dirname( dest ) )
FileUtils.link( src, dest )
end
end
end