import from svn
[unitool.git] / unitool / PIBuild.java
blobdfe10ea08a3f3b5ad66f716d7b252cfc6fbb8176
2 package org.de.metux.unitool.unitool;
4 import org.de.metux.util.*;
5 import org.de.metux.unitool.base.*;
6 import java.io.File;
7 import org.de.metux.unitool.pi.*;
9 public class PIBuild extends Command
11 public PIBuild(String[] args)
13 super(args);
16 public boolean run_CLibraryPlain(Recipe_CLibraryPlain lib)
18 return new Build_CLibraryPlain(lib).run_build();
21 public boolean run_Foo(Recipe_Foo foo)
23 System.err.println("Processing FOO");
24 return false;
27 public boolean run()
28 throws EParameterMissing, EParameterInvalid, EInstallFailed,
29 metux.propertylist.EIllegalValue, EUnsupportedSchema
31 String filename = get_mandatory("recipe");
33 System.err.println("running PI build");
35 LoadConfig cf = new LoadConfig(filename);
37 Recipe r = cf.get_Recipe();
39 try
41 return run_CLibraryPlain((Recipe_CLibraryPlain)r);
43 catch (ClassCastException e) {}
45 try
47 return run_Foo((Recipe_Foo)r);
49 catch (ClassCastException e) {}
51 System.err.println("could not handle this Recipe type! ");
52 return false;