Files
racket-skill/Makefile.md
T
2026-08-31 09:48:50 +02:00

30 lines
1.1 KiB
Markdown

#lang racket/base
(require racket-makefile)
(makefile 'skill
(target 'all
(displayln "Use (make 'install)"))
(target 'install
(let ((home (getenv "HOME")))
(when (eq? home #f)
(error "No $HOME environment variable, cannot find place of .codex"))
(let* ((pwd (current-directory))
(skilld (build-path home ".codex" "skills"))
(racket-skilld (build-path skilld "racket-skill"))
(js-skilld (build-path skilld "javascript-skill"))
(cp (lambda (to-dir file)
(let ((from (build-path pwd file))
(to (build-path to-dir "SKILL.md")))
(unless (directory-exists? to-dir)
(make-directory to-dir))
(displayln (format "cp ~a -> ~a" from to))
(copy-file from to #:exists-ok? #t))))
)
(cp racket-skilld "racket-skill.md")
(cp js-skilld "javascript-skill.md")
)))
)