diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:16:41 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-22 09:17:18 -0700 |
commit | 1eb52e08aa5608d3434bc6530abf43f4d2f632d3 (patch) | |
tree | eb40ce1354dd0f6ba66aff6b171d674fbbc155fe /src/property/file.lisp | |
parent | bd1d90d876c07dbbfac74f6a2b55d879843fc9cc (diff) | |
download | consfigurator-1eb52e08aa5608d3434bc6530abf43f4d2f632d3.tar.gz |
enable passing multiple paths to FILE:DOES-NOT-EXIST & drop :CHECK
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/file.lisp')
-rw-r--r-- | src/property/file.lisp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp index 6db1484..241e32e 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -52,11 +52,12 @@ CONTENT can be a list of lines or a single string." (:apply (mrun (format nil "chmod ~O ~A" mode path)))) -(defprop does-not-exist :posix (path) - "Ensure that a file does not exist." - (:desc #?"${path} does not exist") - (:check (test "!" "-e" path)) - (:apply (run "rm" "-f" path))) +(defprop does-not-exist :posix (&rest paths) + "Ensure that files do not exist." + (:desc (if (cdr paths) + #?"@{paths} do not exist" + #?"${(car paths)} does not exist")) + (:apply (mrun "rm" "-f" paths))) (defprop data-uploaded :posix (iden1 iden2 destination) (:hostattrs |