Skip to content
Snippets Groups Projects
Commit b3609355 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing example packing

parent 30023dba
No related branches found
No related tags found
No related merge requests found
...@@ -57,10 +57,14 @@ class pack_example: ...@@ -57,10 +57,14 @@ class pack_example:
def add_r(self, dir): def add_r(self, dir):
if self.is_example(dir): if self.is_example(dir):
self.copy_example(dir) self.copy_example(dir)
return
# Create the directory in tmp
os.makedirs(self.temporary+os.sep+dir[len(self.base_dir):]+os.sep)
# copy Makefile # copy Makefile
print("copy src:"+dir+os.sep+"Makefile"+" dst:"+self.temporary+os.sep+"Makefile") print("copy src:"+dir+os.sep+"Makefile"+" dst:"+self.temporary+os.sep+dir[len(self.base_dir):]+os.sep+"Makefile")
shutil.copy(dir+os.sep+"Makefile",self.temporary+os.sep+"Makefile") shutil.copy(dir+os.sep+"Makefile",self.temporary+os.sep+dir[len(self.base_dir):]+os.sep+"Makefile")
# List all the folder in the directory # List all the folder in the directory
onlydir = [ f for f in listdir(dir) if isdir(join(dir,f)) ] onlydir = [ f for f in listdir(dir) if isdir(join(dir,f)) ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment