Created
November 3, 2016 13:46
-
-
Save christianromney/d03353bf9aff2a58f92d0d22a4097556 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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