Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add webtools run script

  • Loading branch information...
commit 774326f8b9317928de5eaa9495df3f427c4f7c2b 1 parent 1a9209c
@timfel timfel authored
Showing with 20 additions and 1 deletion.
  1. +2 −1  Rakefile
  2. +18 −0 rakelib/maglev_stone.rb
View
3  Rakefile
@@ -169,7 +169,8 @@ GemStoneInstallation.current.stones.each do |server_name|
[:status, "Report status of the \"#{server_name}\" server"],
[:reload, "Destroy the \"#{server_name}\" repository then load a fresh one"],
[:take_snapshot, "Stop the \"#{server_name}\" server then make a backup copy of its repository"],
- [:restore_snapshot, "Restore the \"#{server_name}\" repository from its previous snapshot"]
+ [:restore_snapshot, "Restore the \"#{server_name}\" repository from its previous snapshot"],
+ [:webtools, "Run the GemStone/S Webtools"],
].each do |action,desc|
stone = MagLevStone.new(server_name, GemStoneInstallation.current)
task_gemstone(stone, action, desc)
View
18 rakelib/maglev_stone.rb
@@ -147,4 +147,22 @@ def with_server_stopped
yield
start if was_running
end
+
+ def webtools
+ www_dir = "#{GemStoneInstallation.current.installation_directory}/examples/www"
+ unless File.exist?("#{www_dir}/installAndRun.tpz")
+ unless File.exist?(gss = "#{ML}/../svn") || File.exist?(gss = "#{ML}/../HPI-GSS")
+ raise "cannot run webtools, please copy the code to #{www_dir}"
+ end
+ FileUtils.chmod("+w", www_dir)
+ Dir["#{gss}/examples/www/*"].each do |file|
+ FileUtils.cp_r(file, www_dir)
+ end
+ end
+ cmds = ["set u DataCurator p swordfish gemstone #{name}",
+ "login",
+ "input $GEMSTONE/examples/www/installAndRun.tpz"]
+ puts "WebTools running on localhost:8080"
+ Topaz.new(self).commands(cmds)
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.