Skip to content

Commit 6442a98

Browse files
committed
regularise library downloads
1 parent 75ba999 commit 6442a98

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/jruby_art/runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def install(library = nil)
144144
choice = library.downcase
145145
case choice
146146
when /sound|video/
147-
system "cd #{K9_ROOT}/vendors && rake download_and_copy_#{choice}"
147+
system "cd #{K9_ROOT}/vendors && rake install_#{choice}"
148148
when /samples/
149149
system "cd #{K9_ROOT}/vendors && rake install_samples"
150150
when /jruby/

vendors/Rakefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ VIDEO_VERSION = 'v2.0'
1919
EXAMPLES = '3.9'
2020
HOME_DIR = ENV['HOME']
2121
MAC_OR_LINUX = /linux|mac|darwin/.match?(RbConfig::CONFIG['host_os'])
22-
22+
DOWNLOAD = 'releases/download/latest'
2323
CLOBBER << "jruby-complete-#{JRUBYC_VERSION}.jar"
2424
CLOBBER << "jruby-complete-#{JRUBYC_VERSION}.jar.sha256"
2525

@@ -82,28 +82,28 @@ task :init_dir do
8282
end
8383

8484
desc 'download and copy sound library to ~/.jruby_art'
85-
task download_and_copy_sound: %i[wget_check init_dir download_sound copy_sound clobber]
85+
task install_sound: %i[wget_check init_dir download_sound copy_sound clobber]
8686

8787
desc 'download and copy video library to ~/.jruby_art'
88-
task download_and_copy_video: %i[wget_check init_dir download_video copy_video clobber]
88+
task install_video: %i[wget_check init_dir download_video copy_video clobber]
8989

9090
desc 'download sound library'
9191
task :download_sound do
9292
wget_base = 'wget https://github.com/processing/processing-sound'
93-
wget_string = [wget_base, 'releases/download/latest', SOUND].join('/')
93+
wget_string = [wget_base, DOWNLOAD, SOUND].join('/')
9494
puts wget_string
9595
system wget_string
9696
end
9797

9898
desc 'download video library'
9999
task :download_video do
100100
wget_base = 'wget https://github.com/processing/processing-video'
101-
wget_string = [wget_base, 'releases/download', VIDEO].join('/')
101+
wget_string = [wget_base, DOWNLOAD, VIDEO].join('/')
102102
system wget_string
103103
end
104104

105105
desc 'copy sound library'
106-
task copy_sound: SOUND do
106+
task :copy_sound do
107107
system "unzip #{SOUND}"
108108
if File.exist? "#{HOME_DIR}/.jruby_art/libraries/sound"
109109
FileUtils.rm_r "#{HOME_DIR}/.picrate/libraries/sound"
@@ -113,7 +113,7 @@ task copy_sound: SOUND do
113113
end
114114

115115
desc 'copy video library'
116-
task copy_video: VIDEO do
116+
task :copy_video do
117117
system "unzip #{VIDEO}"
118118
if File.exist? "#{HOME_DIR}/.jruby_art/libraries/video"
119119
FileUtils.rm_r "#{HOME_DIR}/.picrate/libraries/video"

0 commit comments

Comments
 (0)