aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2011-08-16 22:42:18 +0200
committerSebastian Parborg <darkdefende@gmail.com>2011-08-16 22:42:18 +0200
commit7c6270afa89a33873593e7571089bada260a1abd (patch)
treefdb7a3411991d2a524d2f2209ec2aee78fcba934 /ebuildgen
parentAdded the ebuild to the git repo (diff)
downloadebuildgen-7c6270afa89a33873593e7571089bada260a1abd.tar.gz
ebuildgen-7c6270afa89a33873593e7571089bada260a1abd.tar.bz2
ebuildgen-7c6270afa89a33873593e7571089bada260a1abd.zip
Remove the scm dir if it exists already
Diffstat (limited to 'ebuildgen')
-rw-r--r--ebuildgen/scmprojects.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ebuildgen/scmprojects.py b/ebuildgen/scmprojects.py
index 7310c0b..ae1ecfb 100644
--- a/ebuildgen/scmprojects.py
+++ b/ebuildgen/scmprojects.py
@@ -1,5 +1,7 @@
from subprocess import call
import sys
+import glob
+import shutil
cmdlineget = {
"svn" : "svn checkout ",
@@ -15,6 +17,10 @@ def getsourcecode(adress,repotype):
"""
callstr = cmdlineget[repotype]
+ if glob.glob("/tmp/ebuildgen/curproj"):
+ #this is might not be the best solution
+ shutil.rmtree("/tmp/ebuildgen/curproj")
+
try:
retcode = call(callstr + adress + " /tmp/ebuildgen/curproj",shell=True)
if retcode < 0: