Skip to content

Commit

Permalink
Cleanup script for jenkins workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper@ilogue committed Apr 19, 2012
1 parent 7fdcc12 commit 976eae2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deployment/cleanup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os, shutil

if len(sys.argv)<2:
sys.exit('No keyword given to cleanup.')
keyword = sys.argv[1]

if os.path.exists('env'):
shutil.rmtree('env')

for f in os.listdir(os.getcwd()):
if keyword in f:
print('Cleaning up '+f)
if os.path.isdir(f):
shutil.rmtree(f)
else:
os.remove(f)

0 comments on commit 976eae2

Please sign in to comment.