-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
30 additions
and
110 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
|
||
# | ||
# Cleans up by deleting object files, executable, and _output directory. | ||
# Use after run_examples to clean up stuff not needed on webpages. | ||
|
||
import os,sys,glob | ||
import shutil | ||
|
||
examples_dir = os.path.abspath('./examples') | ||
print "Will remove all _output, _plots, and build directories from ",examples_dir | ||
ans = raw_input("Ok? ") | ||
if ans.lower() not in ['y','yes']: | ||
print "Aborting." | ||
sys.exit() | ||
if __name__ == "__main__": | ||
# | ||
# Cleans up by deleting object files, executable, and _output directory. | ||
# Use after run_examples to clean up stuff not needed on webpages. | ||
examples_dir = os.path.abspath('./examples') | ||
print "Will remove all _output, _plots, and build directories from ",examples_dir | ||
ans = raw_input("Ok? ") | ||
if ans.lower() not in ['y','yes']: | ||
print "Aborting." | ||
sys.exit() | ||
|
||
os.chdir(examples_dir) | ||
exdirlist = [] | ||
for (dirpath, subdirs, files) in os.walk('.'): | ||
currentdir = os.path.abspath(os.getcwd()) | ||
os.chdir(os.path.abspath(dirpath)) | ||
|
||
print 'In directory ',dirpath | ||
|
||
os.chdir(examples_dir) | ||
exdirlist = [] | ||
for (dirpath, subdirs, files) in os.walk('.'): | ||
currentdir = os.path.abspath(os.getcwd()) | ||
os.chdir(os.path.abspath(dirpath)) | ||
|
||
print 'In directory ',dirpath | ||
|
||
if os.path.isdir('_output'): | ||
shutil.rmtree('./_output') | ||
if os.path.isdir('_plots'): | ||
shutil.rmtree('./_plots') | ||
if os.path.isdir('build'): | ||
shutil.rmtree('./build') | ||
|
||
os.chdir(currentdir) | ||
if os.path.isdir('_output'): | ||
shutil.rmtree('./_output') | ||
if os.path.isdir('_plots'): | ||
shutil.rmtree('./_plots') | ||
if os.path.isdir('build'): | ||
shutil.rmtree('./build') | ||
|
||
os.chdir(currentdir) |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains 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
Empty file.