Last active
August 29, 2015 14:13
-
-
Save whitmo/4e274c1fafc71f1ca509 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
def overwrite_with_export(repo, output): | |
repo = path(repo) | |
output = path(output) | |
if not output.exists(): | |
log.critical("Output dir does not exist: {}".format(output)) | |
create = raw_input("Shall I create the output directory? [N/y] ") | |
if create is 'y' or create is 'Y': | |
output.mkdir() | |
for p in repo.files(): | |
p.copy(output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment