@@ -85,10 +85,11 @@ "-test" "-xterm" "-debug" "-host" "-transport" + "-start-dir" ) (list "-h" "-use-server" "-guimonitor" "-main" @@ -109,10 +110,19 @@ (if (args:get-arg "-h") (begin (print help) (exit))) + +(if (args:get-arg "-start-dir") + (if (directory-exists? (args:get-arg "-start-dir")) + (let ((fullpath (common:real-path (args:get-arg "-start-dir")))) + (setenv "PWD" fullpath) + (change-directory fullpath)) + (begin + (debug:print-error 0 *default-log-port* "non-existant start dir " (args:get-arg "-start-dir") " specified, exiting.") + (exit 1)))) ;; TODO: Move this inside (main) ;; (if (not (launch:setup)) (begin