local/bin/recompress: Report all missing programs at once.

master
Pierre Neidhardt 2020-11-06 16:13:48 +01:00
parent 9232fcf392
commit 9bf1809aae
1 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,9 @@
#!/home/ambrevar/.local/bin/sbclscript --script
;;; -*- mode: common-lisp; -*-
;; Atool' arepack is slow since it needs to decompress first (we use
;; archivemount instead) + it changes the path of the included files.
(defun list-files-recursively (directory &key extensions)
"List files in directory with extension in EXTENSIONS.
If EXTENSIONS is empty, list all files."
@ -32,10 +35,10 @@ If EXTENSIONS is empty, list all files."
:error-output :output))
(defun assert-program (program &rest more-programs)
(dolist (p (cons program more-programs))
(or (sera:resolve-executable p)
(warn "~s not found" p)
(uiop:quit 1))))
(sera:and-let* ((missing-programs
(delete-if #'sera:resolve-executable (cons program more-programs))))
(warn "Missing programs: ~{~a~,^, ~}" missing-programs)
(uiop:quit 1)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;