1.1 KiB
1.1 KiB
#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") ))) )