File tree Expand file tree Collapse file tree 8 files changed +67
-19
lines changed Expand file tree Collapse file tree 8 files changed +67
-19
lines changed Original file line number Diff line number Diff line change 13
13
(depends-on " fsdb" " https://github.com/billstclair/fsdb" :git )
14
14
15
15
; ; Test hooks
16
- (qob-add-hook ' qob-before-command-hook
17
- (lambda ()
18
- (qob-info " ? before command" )))
19
-
20
- (qob-add-hook ' qob-after-command-hook
21
- (lambda ()
22
- (qob-info " ? after command" )))
23
-
24
16
(qob-add-hook ' qob-before-info-hook
25
17
(lambda ()
26
18
(qob-info " ? before info" )))
Original file line number Diff line number Diff line change
1
+ ; ;;; cmds/core/load.lisp --- Load lisp files
2
+
3
+ ; ;; Commentary
4
+ ; ;
5
+ ; ; The `load' command definition.
6
+ ; ;
7
+
8
+ ; ;; Code
9
+
10
+ (defpackage qob-cli/load
11
+ (:use cl)
12
+ (:export command))
13
+
14
+ (in-package :qob-cli/load )
15
+
16
+ (defun options ()
17
+ " Options for `load' command."
18
+ (list ))
19
+
20
+ (defun handler (cmd)
21
+ " Handler for `load' command."
22
+ (qob-cli :call-script " core/load" cmd))
23
+
24
+ (defun command ()
25
+ " The `load' command."
26
+ (clingon :make-command
27
+ :name " load"
28
+ :description " Load lisp files"
29
+ :options (options)
30
+ :handler #' handler))
31
+
32
+ ; ;; End of cmds/core/load.lisp
Original file line number Diff line number Diff line change 1
- ; ;;; cmds/core/locate.lisp --- Build executable
1
+ ; ;;; cmds/core/locate.lisp --- Print the Qob installed location
2
2
3
3
; ;; Commentary
4
4
; ;
Original file line number Diff line number Diff line change 67
67
, (qob-cli/install-deps :command)
68
68
, (qob-cli/install-dists :command)
69
69
, (qob-cli/list :command)
70
+ , (qob-cli/load :command)
70
71
, (qob-cli/locate :command)
71
72
, (qob-cli/status :command)
72
73
, (qob-cli/uninstall :command))))
Original file line number Diff line number Diff line change 60
60
:error-output :interactive
61
61
:force-shell t ))
62
62
63
+ (defun qob-expand-file-specs (specs)
64
+ " Expand file SPECS."
65
+ (let ((temp-files))
66
+ (mapcar (lambda (spec)
67
+ (setq temp-files (append temp-files
68
+ (directory spec))))
69
+ specs)
70
+ temp-files))
71
+
63
72
; ;
64
73
; ;; Color
65
74
@@ -158,7 +167,7 @@ The arguments FMT and ARGS are used to form the output message."
158
167
Argument ENV-NAME is used to get the argument string."
159
168
(let* ((args (uiop :getenv env-name))
160
169
(args (concatenate ' string " '" args)))
161
- (qob-eval args)))
170
+ (mapcar #' qob-2str (qob- eval args) )))
162
171
163
172
(defvar qob-args (qob-parse-args " QOB_ARGS" )
164
173
" Positionl arguments (no options)." )
@@ -296,7 +305,7 @@ the `qob-start' execution.")
296
305
; ;; Number (with arguments)
297
306
(defun qob-verbose ()
298
307
" Non-nil when flag has value (`-v', `--verbose')."
299
- (qob--flag-value " --verbose" ))
308
+ (parse-integer ( qob--flag-value " --verbose" ) ))
300
309
301
310
; ;
302
311
; ;; Execution
@@ -510,12 +519,7 @@ to actually set up the systems."
510
519
components)
511
520
(directory " *.asd" )
512
521
(directory " *.lisp" )
513
- (let ((temp-files))
514
- (mapcar (lambda (spec)
515
- (setq temp-files (append temp-files
516
- (directory spec))))
517
- qob-files)
518
- temp-files)))
522
+ (qob-expand-file-specs qob-files)))
519
523
files))
520
524
521
525
; ;
Original file line number Diff line number Diff line change 1
- ; ;;; lisp/core/list.lisp --- Build executable
1
+ ; ;;; lisp/core/list.lisp --- List the registered systems
2
2
3
3
; ;; Commentary
4
4
; ;
5
- ; ; Command use to list the registered system
5
+ ; ; Command use to list the registered systems
6
6
; ;
7
7
; ; $ qob list
8
8
; ;
Original file line number Diff line number Diff line change
1
+ ; ;;; lisp/core/load.lisp --- Load lisp files
2
+
3
+ ; ;; Commentary
4
+ ; ;
5
+ ; ; Command use to load lisp files
6
+ ; ;
7
+ ; ; $ qob load [files..]
8
+ ; ;
9
+
10
+ ; ;; Code
11
+
12
+ (qob-start
13
+ (let ((files (qob-expand-file-specs (qob-args))))
14
+ (if files
15
+ (mapc #' load files)
16
+ (eask-info " (Nothing to load.)" ))))
17
+
18
+ ; ;; End of lisp/core/load.lisp
Original file line number Diff line number Diff line change 25
25
(:file " cmds/core/install-deps" )
26
26
(:file " cmds/core/install-dists" )
27
27
(:file " cmds/core/list" )
28
+ (:file " cmds/core/load" )
28
29
(:file " cmds/core/locate" )
29
30
(:file " cmds/core/status" )
30
31
(:file " cmds/core/uninstall" )
You can’t perform that action at this time.
0 commit comments