Permalink
Browse files

dont clean workdir when using tools

  • Loading branch information...
1 parent 559a0ae commit bd0284379176c2680970933f04ba96201561bc26 @r1k0 committed Apr 30, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 kigen
View
13 kigen
@@ -116,20 +116,19 @@ logging.debug(flavor)
# show flavor
print(green(' * ')+white(flavor)+' on '+white(cli['arch']))
-# ensure temp['work'] is clean
-import shutil
-if os.path.isdir(temp['work']):
- shutil.rmtree(temp['work'])
- os.makedirs(temp['work'])
+# ensure temp['work'] is clean only if target != tool
+if target != 'tool' and target != 't':
+ import shutil
+ if os.path.isdir(temp['work']):
+ shutil.rmtree(temp['work'])
+ os.makedirs(temp['work'])
# --nocache
if cli['nocache'] is True:
if os.path.isdir(temp['cache']):
logging.debug('deleting '+temp['cache'])
-
# delete
shutil.rmtree(temp['cache'])
-
# re create
logging.debug('creating '+temp['cache'])
os.makedirs(temp['cache'])

0 comments on commit bd02843

Please sign in to comment.