34 $AllPossibleOpts =
"abc:d:ef:ghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
38 $DatabaseName =
"fossology";
39 $UpdateLiceneseRef =
false;
43 $SchemaFilePath =
"$MODDIR/www/ui/core-schema.dat";
46 $Options = getopt($AllPossibleOpts);
47 foreach ($Options as $Option => $OptVal) {
52 $DatabaseName = $OptVal;
55 $SchemaFilePath = $OptVal;
61 echo
"Invalid Option \"$Option\".\n";
69 $usage =
"Usage: " . basename($argv[0]) .
" [options] 70 Update FOSSology database. Options are: 71 -d {database name} default is 'fossology' 76 if (file_exists($SchemaFilePath) && !@unlink($SchemaFilePath)) {
77 $FailMsg =
"Existing schema data file ($SchemaFilePath) could not be removed.";
82 if ($FailMsg !==
false) {
83 print
"ERROR: $FailMsg \n";
ExportSchema($filename=NULL)
Export the schema of the connected ($PG_CONN) database to a file in the format readable by GetSchema(...