40 if(!defined(
'TESTROOT'))
42 $TR = getenv(
'TESTROOT');
45 echo
"FATAL! bootstrap cannot determine TESTROOT\n";
49 $rcfile = TESTROOT.
'/fossologyTest.rc';
51 $sysconfdir = getenv(
'SYSCONFDIR');
52 if ($sysconfdir ===
false)
54 if (file_exists($rcfile)) $sysconfdir = file_get_contents($rcfile);
55 if ($sysconfdir ===
false)
58 $text = _(
"FATAL: System Configuration Error, no SYSCONFDIR.");
59 echo
"<hr><h3>$text</h3><hr>";
64 $sysconfdir =
trim($sysconfdir);
65 $GLOBALS[
'SYSCONFDIR'] = $sysconfdir;
68 $ConfFile =
"{$sysconfdir}/fossology.conf";
69 $SysConf = parse_ini_file($ConfFile,
true);
75 foreach($SysConf[
'DIRECTORIES'] as $var=>$assign)
80 $toeval =
"\$$var = \"$assign\";";
84 $SysConf[
'DIRECTORIES'][$var] = ${$var};
85 $GLOBALS[$var] = ${$var};
90 $text = _(
"FATAL: System initialization failure: MODDIR not defined in fossology.conf");
bootstrap()
Bootstrap the fossology test system.
char * trim(char *ptext)
Trimming whitespace.