Revision 1804 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/alceste/compiler.groovy

compiler.groovy (revision 1804)
151 151
			return false;
152 152
		}
153 153
		
154
		CorpusBuild corpus = project.getCorpusBuild(project.getName());
154
		
155
		CorpusBuild corpus = project.getCorpusBuild(project.getName(), MainCorpus.class);
155 156
		if (corpus != null) {
156
			println "CLEAN PREVIOUS CORPUS"
157
			corpus.delete(); // remove old files
157
			if (project.getDoUpdate()) {
158
				corpus.clean(); // remove old files
159
			} else {
160
				corpus.delete(); // remove old files and TXMResult children
161
			}
162
		} else {
163
			corpus = new MainCorpus(project);
164
			corpus.setID(project.getName());
165
			corpus.setName(project.getName());
158 166
		}
159
			
160
		// make new one
161
		corpus = new MainCorpus(project);
162
		corpus.setID(project.getName());
163
		corpus.setName(project.getName());
164 167
		corpus.setDescription("Build the Alceste import module");
165 168

  
166 169
		File cqpFile = new File(binDir,"cqp/"+corpusname+".cqp");

Also available in: Unified diff