|
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 : 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |