diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-24 17:12:38 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-24 17:13:10 -0700 |
commit | c4624df9d40df313f490207c37c7a9f629929936 (patch) | |
tree | 865b30cffee61eda6992447d3daf6257700b8886 /src/connection.lisp | |
parent | e5221bf896e49f36cf7593cc6c1e0ac8a7319c01 (diff) | |
download | consfigurator-c4624df9d40df313f490207c37c7a9f629929936.tar.gz |
add GIT:SNAPSHOT-EXTRACTED
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index b993761..56f2985 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -327,6 +327,17 @@ start with RUN." (defun test (&rest args) (zerop (apply #'mrun :for-exit "test" args))) +(defun delete-remote-tree (&rest paths) + "Recursively delete each of PATHS." + (mrun "rm" "-rf" paths)) + +(defun remote-exists-p (&rest paths) + "Does each of PATHS exists? +PATH may be any kind of file, including directories." + (test (loop for path on paths + nconc (list "-e" (car path)) + when (cdr path) collect "-a"))) + (defun readfile (&rest args) (apply #'connection-readfile *connection* args)) |