Ejemplo n.º 1
0
// Should the host be what's in fossology.conf?
$conf = "dbname={$DbName};\n" . "host=localhost;\n" . "user=fossy;\n" . "password=fossy;\n";
if (file_put_contents($confPath . "/Db.conf", $conf) === FALSE) {
    echo "FATAL! Could not create Db.conf file at:{$confPath}\n";
    exit(1);
}
// copy and modify fossology.conf
$fossConf = $sysconfig . '/fossology.conf';
$myConf = $confPath . '/fossology.conf';
if (file_exists($fossConf)) {
    if (copy($fossConf, $myConf) === FALSE) {
        echo "FATAL! cannot copy {$fossConf} to {$myConf}\n";
        exit(1);
    }
}
if (setRepo($confPath, $repoPath) === FALSE) {
    echo "ERROR!, could not change {$sysconfig}/fossology.conf, please change by " . "hand before running tests\n";
    exit(1);
}
// copy mods-enabled from real sysconf.
$modConf = $sysconfig . '/mods-enabled';
$cmd = "cp -RP {$modConf} {$confPath}";
if (system($cmd) === FALSE) {
    //echo "DB: Cannot copy directory $modConf to $confPath\n";
    exit(1);
}
// copy version file
// copy and modify fossology.conf
$version = $sysconfig . '/VERSION';
$myVersion = $confPath . '/VERSION';
if (file_exists($fossConf)) {
Ejemplo n.º 2
0
?>
</th>
                    <th><?php 
echo t('author');
?>
</th>
                    <th><?php 
echo t('lastModif');
?>
</th>
                </tr>
            </thead>
            <tbody>
                <?php 
foreach (getReposList() as $key => $repo) {
    setRepo($repo);
    ?>
                    <tr>
                        <td><span class="fa fa-archive"></span> <a href="<?php 
    echo getUrl('repo', "", true, array('repo' => $repo));
    ?>
"><?php 
    echo $key;
    ?>
</a></td>
                        <td><span class="badge"><?php 
    echo getLastRev();
    ?>
</span></td>
                        <td><?php 
    echo getCommitAuthor();