commander-s/install.scm

45 lines
1.5 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.1/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 2) ((install-lib-version (1 3)))
;; Install documentation
(install-file "doc/man.pdf" 'doc "pdf")
(install-directory-contents "doc/html" 'doc "html")
(install-directory-contents "scheme" 'scheme)
(install-file "commander-s" 'bin))))