From 41b04c179964b7cc6a83e6749c436b3ba6cb0d39 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 2 May 2021 13:06:57 -0700 Subject: replace WITH-LOCAL-... with an EVALS property Signed-off-by: Sean Whitton --- src/deployment.lisp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/deployment.lisp') diff --git a/src/deployment.lisp b/src/deployment.lisp index 104a810..0703c37 100644 --- a/src/deployment.lisp +++ b/src/deployment.lisp @@ -271,3 +271,20 @@ different user." (pushnew system (slot-value (host-propspec *host*) 'systems))) (dolist (attr (getf (hostattrs host) :data)) (push-hostattrs :data attr))) + +(defprop evals :posix (&rest forms) + "Property which just evaluates each of FORMS using EVAL. Only for testing +newly defined functions and programmatic applications of properties at the +REPL with DEPLOY-THESE/HOSTDEPLOY-THESE -- do not add to hosts. + +For example, to sudo to root to test your new function which needs root +privileges to do anything at all, + + (deploy-these :sudo melete.silentflame.com (evals '(my-new-function))) + +where melete.silentflame.com is your laptop. + +Note that while this property is declared to be :POSIX for flexibility, +whether it is actually :POSIX depends on what input and output FORMS perform." + (:desc (format nil "Evaluated ~{~S~^ ~}" forms)) + (:apply (eval `(progn ,@forms)))) -- cgit v1.2.3