-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.rb
More file actions
51 lines (36 loc) · 1 KB
/
install.rb
File metadata and controls
51 lines (36 loc) · 1 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Install hook code here
plugin_dir = File.dirname(__FILE__)
root_dir = File.join(plugin_dir, '..', '..', '..')
# copy master image files
FileUtils.makedirs File.join(root_dir, 'public', 'images', 'master')
[
"arrow_dropdown.gif",
"button_bg.png",
"background-gradient.gif",
"header-background.gif",
"spinner.gif",
"transparentGif.gif"
].each do |s|
FileUtils.copy(
File.join(plugin_dir, 'images', s),
File.join(root_dir, 'public', 'images', 'master', s)
)
end
# copy javascript files
# File.makedirs File.join(root_dir, 'public', 'javascripts')
["suddenlybunt", "behaviors", "prototype"].each do |s|
FileUtils.copy(
File.join(plugin_dir, 'javascripts', "#{s}.js"),
File.join(root_dir, 'public', 'javascripts', "#{s}.js")
)
end
# copy xml files
FileUtils.makedirs File.join(root_dir, 'public', 'stylesheets', 'xml')
[
"ellipsis.xml"
].each do |s|
FileUtils.copy(
File.join(plugin_dir, 'xml', s),
File.join(root_dir, 'public', 'stylesheets', 'xml', s)
)
end