- Timestamp:
- Mar 29, 2016, 4:36:21 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-meta-maker/trunk/fuentes/src/metamaker/__init__.py
r940 r975 93 93 return 0 94 94 95 #get only seeds exists 95 96 dfstructure = open(structurefile,'r') 96 97 lines = dfstructure.readlines() … … 107 108 dfstructure = fileinput.FileInput(pathseed,inplace=True) 108 109 for line in dfstructure: 109 if line.lower(): 110 continue 111 for seed in seedstorename: 112 line = re.sub(r"^"+seed+":",baseflavour+"-"+seed+":",line) 113 line = re.sub(r"(\s*)"+seed+r"(\s+|$)",r"\1"+baseflavour+"-"+seed+r"\2",line) 114 print(line,end="") 110 if re.search(r'^Task:Seeds:',line,re.I): 111 for seed in seedstorename: 112 line = re.sub(r'(Task-Seeds:)((\s*\w+\s+)*)('+seed+r')(\s+.*|$)',r'\1\2'+baseflavour+r'-\4\5',line,0,re.I) 113 print(line,end="") 115 114 dfstructure.close() 116 115 os.rename(pathseed ,os.path.join(basedir,baseflavour+"-"+seed)) … … 124 123 line = re.sub(r"(\s*)"+seed+r"(\s+|$)",r"\1"+baseflavour+"-"+seed+r"\2",line) 125 124 print(line,end="") 125 shutil.move(basedir,self.root + "/seeds/") 126 126 127 127 def complete_create(self,text,line,begidx,endidx):
Note: See TracChangeset
for help on using the changeset viewer.