The commander-s executable is now an image

This commit is contained in:
mainzelm 2005-10-04 13:39:37 +00:00
parent c4c21653ef
commit a45ef09bdb
1 changed files with 27 additions and 15 deletions

View File

@ -6,22 +6,34 @@ exec scsh -lel install-lib/load.scm -dm -o install-commander-s -e install-progra
(open scheme-with-scsh (open scheme-with-scsh
install-lib) install-lib)
(begin (begin
(define commander-s-template #<<END
#!/bin/sh
exec scsh -lel afs/load.scm -lel pps/load.scm -lel module-system/load.scm -lel interaction/load.scm -lel cml/load.scm -lm ~a/debug-packages.scm -lel scsh-ncurses-0.2/load.scm -lm ~a/nuit-packages.scm -m nuit -s "$0"
!#
(nuit)
(run (scsh -lel afs/load.scm -lel pps/load.scm -lel module-system/load.scm -lel
interaction/load.scm -lel cml/load.scm -lm scheme/debug-packages.scm -lel scsh-ncurses-1.0/load.scm
-lm scheme/nuit-packages.scm -o nuit -e main -sfd 0)
(<< #<<END
(define (main args)
(define image-header
(format #f "#!~a/scsh/scshvm \\\n-o ~a/scsh/scshvm -i\n" (lib-dir) (lib-dir)))
(with-current-output-port
(open-output-file "commander-s.header")
(display image-header))
(dump-scsh-program
(lambda a (nuit)) "commander-s.image")
(run (cat "commander-s.header" "commander-s.image") (> "commander-s"))
(set-file-mode "commander-s" #o755)
(delete-file "commander-s.header")
(delete-file "commander-s.image"))
END END
) ))
(define-program "commander-s" (0 1) ((install-lib-version (1 1))) (define-program "commander-s" (0 1) ((install-lib-version (1 2)))
(install-directory-contents "scheme" 'scheme) (install-directory-contents "scheme" 'scheme)
(install-string (format #f commander-s-template (install-file "commander-s" 'bin))))
(get-directory 'scheme #f) (get-directory 'scheme #f))
"commander-s"
'bin
"."
#o555))))