Use launchy for opening browsers
This commit is contained in:
10
rakefile
10
rakefile
@@ -601,15 +601,7 @@ task :showdocs, [:options] do |t, args|
|
||||
end
|
||||
|
||||
Dir.chdir("#{path}/build/html") do
|
||||
if RUBY_PLATFORM.include? 'darwin' # mac os
|
||||
sh('open index.html')
|
||||
elsif RUBY_PLATFORM.include? 'linux' # make more ubuntu specific?
|
||||
sh('sensible-browser index.html') # ubuntu
|
||||
else
|
||||
raise "\nUndefined how to run browser on your machine.
|
||||
Please use 'rake builddocs' and then manually open
|
||||
'mitx/#{path}/build/html/index.html."
|
||||
end
|
||||
Launchy.open('index.html')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user