commander-s/install.scm

41 lines
1.3 KiB
Scheme
Executable File

#!/bin/sh
exec scsh -lel install-lib/load.scm -dm -o install-commander-s -e install-program-main -s "$0" "$@"
!#
(define-structure install-commander-s (export install-program-main)
(open scheme-with-scsh
install-lib)
(begin
(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-output-to-file
"commander-s.header"
(lambda ()
(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
))
(define-program "commander-s" (0 1) ((install-lib-version (1 2)))
(install-directory-contents "scheme" 'scheme)
(install-file "commander-s" 'bin))))