/usr/share/doc/cl-asdf/examples/test-try-recompiling-1.script is in cl-asdf 2:2.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ;;; -*- Lisp -*-
;;; test asdf:try-recompiling restart
(load "script-support.lisp")
(load-asdf)
(defvar *caught-error* nil)
(quit-on-error
(asdf:run-shell-command "rm -f ~A"
(namestring
(compile-file-pathname "try-recompiling-1")))
(setf asdf:*central-registry* '(*default-pathname-defaults*))
#-gcl
(handler-bind ((error (lambda (c)
(setf *caught-error* t)
(multiple-value-bind (name mode)
(find-symbol
(symbol-name 'try-recompiling)
:asdf)
(assert (eq mode :external))
(let ((restart (find-restart name c)))
#+(or)
;; debug
(print (list c restart (compute-restarts c)))
(when restart
(invoke-restart restart)))))))
(asdf:oos 'asdf:load-op 'try-recompiling-1))
(assert *caught-error*)
)
|