52 if(!defined(
'TESTROOT'))
54 $TR = getenv(
'TESTROOT');
57 echo
"FATAL! bootstrap cannot determine TESTROOT\n";
61 $rcfile = TESTROOT.
'/fossologyTest.rc';
63 $sysconfdir = getenv(
'SYSCONFDIR');
64 if ($sysconfdir ===
false)
66 if (file_exists($rcfile)) $sysconfdir = file_get_contents($rcfile);
67 if ($sysconfdir ===
false)
70 $text = _(
"FATAL: System Configuration Error, no SYSCONFDIR.");
71 echo
"<hr><h3>$text</h3><hr>";
76 $sysconfdir =
trim($sysconfdir);
77 $GLOBALS[
'SYSCONFDIR'] = $sysconfdir;
80 $ConfFile =
"{$sysconfdir}/fossology.conf";
81 $SysConf = parse_ini_file($ConfFile,
true);
87 foreach($SysConf[
'DIRECTORIES'] as $var=>$assign)
92 $toeval =
"\$$var = \"$assign\";";
96 $SysConf[
'DIRECTORIES'][$var] = ${$var};
97 $GLOBALS[$var] = ${$var};
102 $text = _(
"FATAL: System initialization failure: MODDIR not defined in fossology.conf");
bootstrap()
Bootstrap the fossology test system.
char * trim(char *ptext)
Trimming whitespace.