summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorTom Black <[email protected]>2017-03-07 23:18:43 -0500
committerTom Black <[email protected]>2017-03-07 23:18:43 -0500
commit0ee98a0f0bf8636c7d521257d5a79431fbbd1277 (patch)
treece85887c7cd2924ccd1d291c819b37a54739495d /Rakefile
parent2c9884dfd1b78df742f974b2eee16f6e1d1021f1 (diff)
downloadruby2d-0ee98a0f0bf8636c7d521257d5a79431fbbd1277.tar.gz
ruby2d-0ee98a0f0bf8636c7d521257d5a79431fbbd1277.zip
Use a more cross-platform "open" command
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index afd4383..1026af1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -45,7 +45,9 @@ end
def run_web_test(file)
print_task "Running web build test"
run_cmd "ruby2d build --web test/#{file}.rb --debug"
- system "open build/app.html"
+ open_cmd = 'open'
+ if RUBY_PLATFORM =~ /linux/ then open_cmd = "xdg-#{open_cmd}" end
+ system "#{open_cmd} build/app.html"
end
# Tasks