src/Main.vala
authorAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 06:35:15 +0000 (14:35 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 06:35:15 +0000 (14:35 +0800)
src/Main.vala

index ee21bf4..d097808 100644 (file)
@@ -44,22 +44,29 @@ int main (string[] args) {
                print("Projects\n %s\n", Project.Project.listAllToString());
                GLib.Process.exit(Posix.EXIT_SUCCESS);
        }
-       var cur_project = null;
+       Project.Project cur_project = null;
     if (BuilderApplication.opt_compile_project != null) {
                 
                 
                cur_project = Project.Project.getProjectByHash( BuilderApplication.opt_compile_project);
                
                if (cur_project == null) {
-                       GLib.error("invalid project %s, use --list-projects to show project ids");
+                       GLib.error("invalid project %s, use --list-projects to show project ids",BuilderApplication.opt_compile_project);
                }
                
        }
-    
-    
+       
+       if (BuilderApplication.opt_list_files) {
+               if (cur_project == null) {
+                       GLib.error("missing project, use --project to select which project");
+               }
+               print("Files\n %s\n",  cur_project.listAllFilesToString());
+               GLib.Process.exit(Posix.EXIT_SUCCESS);
+       }
     
     if (BuilderApplication.opt_bjs_compile != null) {
-                
+                       
+               
                //BuilderApplication.compileBjs();
         print("compile BJS comming soon");