add swank-repl script

This commit is contained in:
LordMZTE 2023-05-13 13:28:36 +02:00
parent 6550a3b587
commit f396610ca2
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 26 additions and 10 deletions

14
scripts/swank-repl.ros Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env -S ros -Q --
#|-*- mode:lisp -*-|#
(progn
(ros:ensure-asdf)
(ql:quickload '(:swank :mondo) :silent t))
(defpackage :swank-repl
(:use :cl))
(in-package :swank-repl)
(defun main (&rest argv)
(declare (ignorable argv))
(let ((port (swank:create-server :dont-close t)))
(mondo:main nil :port port)))

View file

@ -3,19 +3,21 @@
(provide run)
(define-logging mklink
(λ (from to)
(with-handlers ([exn:fail? (const #f)]) (delete-file to))
(make-file-or-directory-link (normalize-path from) to)))
(λ (from to)
(with-handlers ([exn:fail? (const #f)]) (delete-file to))
(make-file-or-directory-link (normalize-path from) to)))
(define (run)
(define (bin-path bin)
(build-path (output-bin-path) "bin" bin))
;; Symlink interpreted scripts
(mklink "scripts/map-touch-display.rkt" (build-path (output-bin-path) "bin" "map-touch-display"))
(mklink "scripts/playvid.rkt" (build-path (output-bin-path) "bin" "playvid"))
(mklink "scripts/start-joshuto.sh" (build-path (output-bin-path) "bin" "start-joshuto"))
(mklink "scripts/startriver.sh" (build-path (output-bin-path) "bin" "startriver"))
(mklink "scripts/update-nvim-plugins.rkt"
(build-path (output-bin-path) "bin" "update-nvim-plugins"))
(mklink "scripts/withjava.sh" (build-path (output-bin-path) "bin" "withjava"))
(mklink "scripts/map-touch-display.rkt" (bin-path "map-touch-display"))
(mklink "scripts/playvid.rkt" (bin-path "playvid"))
(mklink "scripts/start-joshuto.sh" (bin-path "start-joshuto"))
(mklink "scripts/startriver.sh" (bin-path "startriver"))
(mklink "scripts/swank-repl.ros" (bin-path "swank-repl"))
(mklink "scripts/update-nvim-plugins.rkt" (bin-path "update-nvim-plugins"))
(mklink "scripts/withjava.sh" (bin-path "withjava"))
;; Compile Zig scripts
(install-zig "scripts/mzteinit")