Skip to content

Instantly share code, notes, and snippets.

@christianromney
Created November 3, 2016 13:46
Show Gist options
  • Save christianromney/d03353bf9aff2a58f92d0d22a4097556 to your computer and use it in GitHub Desktop.
Save christianromney/d03353bf9aff2a58f92d0d22a4097556 to your computer and use it in GitHub Desktop.
(deftask overwrite
[f file VAL str "The path of the file to overwrite"
w with VAL str "The file containing the source content"]
(with-pre-wrap fs
(let [{:keys [file with]} *opts*
src-file (tmp-get fs with)
out-file (tmp-get fs file)]
(-> fs
(cp (tmp-file src-file) out-file)
commit!))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment