UpdateDatabase.php
authorAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 06:00:15 +0000 (14:00 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 06:00:15 +0000 (14:00 +0800)
UpdateDatabase.php

index b78e04c..3ed1c33 100644 (file)
@@ -86,6 +86,14 @@ class Pman_Xtuple_UpdateDatabase extends Pman
             die("--base=XXX  must be set when using --init ");
         }
         
+        foreach($opts as $o=>$v) {
+            if (!empty(preg_match('/^json-/', $o)) {
+                continue;
+            }
+            if (!file_exists($v)) {
+                die("File does not exist : OPTION --{$o} = {$v} \n");
+            }
+        }
         
         
     }
@@ -99,6 +107,8 @@ class Pman_Xtuple_UpdateDatabase extends Pman
         
         DB_DataObject::factory('accnt')->importFromArray($this, $accounts);
         
+        
+        
         die("DONE! \n");
     }
     }