[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] Integrity Checker

From: Frédéric FRANCE
Subject: [Dolibarr-dev] Integrity Checker
Date: Thu, 19 Feb 2015 22:15:39 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hello all

I have posted :
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:
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);
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;
    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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]