2 package org
.de
.metux
.unitool
.libtool
;
4 import org
.de
.metux
.unitool
.db
.UnitoolConf
;
5 import org
.de
.metux
.util
.StrUtil
;
6 import org
.de
.metux
.propertylist
.IPropertylist
;
7 import org
.de
.metux
.unitool
.base
.ToolConfig
;
12 static boolean silent
= false;
14 static void exit_err(String text
)
16 System
.err
.println(text
);
20 static private String
[] cutfirstarg(String argv
[])
22 String newarg
[] = new String
[argv
.length
-1];
23 for (int x
=0; x
<(argv
.length
-1); x
++)
24 newarg
[x
] = argv
[x
+1];
28 public static void main(String argv
[]) throws Exception
31 exit_err("missing parameters");
33 // FIXME: should be used somewhere ?
34 if (argv
[0].startsWith("--tag="))
36 tag
= argv
[0].substring(6);
37 main(cutfirstarg(argv
));
41 if (argv
[0].equals("--preserve-dup-deps"))
43 main(cutfirstarg(argv
));
47 if (argv
[0].equals("--silent"))
50 main(cutfirstarg(argv
));
54 ToolConfig config
= UnitoolConf
.getToolConfig();
57 if (argv
[0].equals("--mode=link"))
58 new CmdLink(argv
,config
).run();
59 else if (argv
[0].equals("--mode=compile"))
60 new CmdCompile(argv
,config
).run();
61 else if (argv
[0].equals("--mode=install"))
62 new CmdInstall(argv
,config
).run();
64 exit_err("unsupported mode: "+argv
[0]);