ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ComponentManager.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ComponentManager.java (file contents):
Revision 1.10 by tdb, Thu Jan 18 23:22:22 2001 UTC vs.
Revision 1.11 by tdb, Sun Jan 28 05:14:46 2001 UTC

# Line 47 | Line 47 | public class ComponentManager {
47       * @param args the command line arguments
48       */
49      public static void main(String[] args) {
50 <        System.out.println("--- I-Scream System Component Manager ---");
50 >        System.out.println("--- i-scream Server Component Manager ---");
51          System.out.println("---          Starting System          ---");        
52          
53          // get the command line args
54        // this is a bit messy and should be looked at
54          String defaultProperties = DEFAULTPROPERTIES;
55          String filterName = null;
56 <        if (args.length > 0) {
57 <            if (args[0].equals("-l")) {
59 <                defaultProperties = args[1];
60 <            } else if (args[0].equals("-f")) {
61 <                filterName = args[1];
62 <            } else if (args[2].equals("-l")) {
63 <                filterName = args[3];
64 <            } else if (args[2].equals("-f")) {
65 <                filterName = args[3];
66 <            } else {
56 >        for(int i=0; i < args.length; i++) {
57 >            if(args[i].equals("-h") {
58                  usage();
59 <            }            
59 >            }
60 >            else if(args[i].equals("-f") {
61 >                i++; filterName = args[i];
62 >            }
63 >            else if(args[i].equals("-l") {
64 >                i++; defaultProperties = args[i];
65 >            }
66 >            else {
67 >                usage();
68 >            }
69          }
70  
71          // load the default properties file into the system properties

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines