sunet/scheme/httpd/surflets/load-surflet-server.scm

38 lines
1.1 KiB
Scheme
Raw Normal View History

; reads package description in the right order
; in the end, the server can be started via (server)
(batch 'on)
(define *ASSUMED-SUNET-HOME*
(in 'scsh '(run (match:substring
(regexp-search (rx (submatch (* any) "sunet")) (cwd))
1))))
(define *SUNET-PACKAGE*
(in 'scsh `(run (string-append
(or (getenv "SUNETHOME")
,*ASSUMED-SUNET-HOME*)
"/packages.scm"))))
(define *SSAX-PACKAGE*
(in 'scsh `(run (string-append
(or (getenv "SSAXPATH")
(string-append ,*ASSUMED-SUNET-HOME* "/SSAX"))
"/lib/packages.scm"))))
2003-01-19 11:57:27 -05:00
(define *SURFLET-PACKAGE*
(in 'scsh `(run (string-append
(or (getenv "SUNETHOME")
,*ASSUMED-SUNET-HOME*)
"/httpd/surflets/packages.scm"))))
2003-01-19 11:57:27 -05:00
(define *SURFLET-SERVER*
(in 'scsh `(run (string-append
(or (getenv "SUNETHOME")
,*ASSUMED-SUNET-HOME*)
"/httpd/surflets/start-surflet-server"))))
(config `(load ,*SUNET-PACKAGE*))
(config `(load ,*SSAX-PACKAGE*))
2003-01-19 11:57:27 -05:00
(config `(load ,*SURFLET-PACKAGE*))
(config `(load ,*SURFLET-SERVER*))
(user)
2003-01-19 11:57:27 -05:00
(open 'surflet-server)
(batch 'off)
(in 'scsh '(run (display "type (server) to start the server\n")))