module WE = WebEngine
let help_B = "<url> Set this base url (default: http://helm.cs.unibo.it/lambdadelta/)"
-let help_C = "<dir> Set this working directory (default: current directory)"
+let help_C = "<dir> Set this relative working directory (default: invocation directory)"
let help_L = " Debug osn lexer"
let help_W = " Run as an LWS application"
let help_X = " Reset all options to defaults"
let help_w = " Save current status"
let help = "Usage: roles [ -LWXamprw | -B <url> | -C <dir> | -os <version> | -t <pointer> | <file> ]*"
+let change_cwd s =
+ EG.cwd := Filename.concat !EG.cwd s
+
let add_tops s =
EE.add_tops (EU.version_of_string s)
let _main = try
Arg.parse [
"-B", Arg.String ((:=) EG.base_url), help_B;
- "-C", Arg.String ((:=) EG.wd), help_C;
+ "-C", Arg.String change_cwd, help_C;
"-L", Arg.Set EG.debug_lexer, help_L;
"-W", Arg.Unit WE.init, help_W;
"-X", Arg.Unit EG.clear, help_X;