1.1--- a/lisp/bin/skel.lisp Tue Sep 10 21:52:14 2024 -0400
1.2+++ b/lisp/bin/skel.lisp Wed Sep 11 17:24:07 2024 -0400
1.3@@ -7,7 +7,7 @@
1.4 (:use :cl :std :cli/clap :cli/clap/vars
1.5 :vc :sb-ext :skel :log
1.6 :dat/sxp #+tools :skel/tools/viz)
1.7- (:import-from :cli/shell :*shell-input*)
1.8+ (:import-from :cli/shell :*shell-input* :*shell-directory*)
1.9 (:use :cli/tools/sbcl)
1.10 (:export :main))
1.11
1.12@@ -79,11 +79,12 @@
1.13 (println (std:format-sxhash (obj/id:id (find-skelfile #P"." :load t)))))
1.14
1.15 (defun call-with-args (action args)
1.16- (if (null args)
1.17- (sk-call *skel-project* action)
1.18- (mapc (lambda (x)
1.19- (sk-call *skel-project* (keywordicate action '- (string-upcase x))))
1.20- args)))
1.21+ (let* ((*default-pathname-defaults* *skel-path*))
1.22+ (if (null args)
1.23+ (sk-call *skel-project* action)
1.24+ (mapc (lambda (x)
1.25+ (sk-call *skel-project* (keywordicate action '- (string-upcase x))))
1.26+ args))))
1.27
1.28 (defcmd skc-compile
1.29 (call-with-args :compile *args*))
1.30@@ -347,5 +348,8 @@
1.31 (debug-opts *cli*)
1.32 (init-skel-vars)
1.33 (when-let ((project (find-skelfile #P".")))
1.34- (setq *skel-project* (load-skelfile project)))
1.35+ (let ((*default-pathname-defaults* (pathname (directory-namestring project))))
1.36+ (setq *skel-project* (load-skelfile project))
1.37+ (setq *skel-shell* (sk-src *skel-project*))
1.38+ (setq *shell-directory* (sk-src *skel-project*))))
1.39 (do-cmd *cli*))))