Hello all

I have posted : https://github.com/Dolibarr/dolibarr/pull/2374
It's to check missing or modified files.
Can anyone help me to make a little script to produce xml file at release.
Here is the script I use to generate xml:
<?php
header('Content-type: text/xml');

print '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
print '<checksum_list>'."\n";
print '<dolibarr_root_dir version="3.6.2">'."\n";

$dir_iterator = new RecursiveDirectoryIterator(dirname(__FILE__));
$iterator = new RecursiveIteratorIterator($dir_iterator);
$dir='';
$needtoclose=0;
foreach ($iterator as $file) {
    $newdir =
str_replace('/mnt/data/fred/github/dolibarr/htdocs','',dirname($file));
//Need to adapt
    if ($newdir!=$dir) {
        if ($needtoclose)
            print '</dir>'."\n";
        print '<dir name="'.$newdir.'" >'."\n";
        $dir = $newdir;
        $needtoclose=1;
    }
    if (filetype($file)=="file") {
        print '<md5file
name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n";
    }
}
print '</dir>'."\n";
print '</dolibarr_root_dir>'."\n";
print '</checksum_list>'."\n";

I put it in htdocs and after i have to clean the result (remove custom,
conf, document and this script)

Frédéric FRANCE

_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à