diff --git a/src/dda/backup/infrastructure.clj b/src/dda/backup/infrastructure.clj index 9a92d9c..a0b8b89 100644 --- a/src/dda/backup/infrastructure.clj +++ b/src/dda/backup/infrastructure.clj @@ -12,3 +12,12 @@ (println c)) (when-not dry-run (apply t/shell c))))) + +(defn-spec execute-out! string? + [command ::core/command + config ::core/execution] + (let [{:keys [dry-run debug]} config] + (when debug + (println command)) + (when-not dry-run + (:out (t/shell {:out :string} (clojure.string/join " " command)))))) \ No newline at end of file