Are you asking how we would go about updating a version of the program for each package?
If so, then I personally would store all the different directory names in a textfile/database and loop through them. In each loop copy the files from a "base" directory into each individual directory
// example
$dirName = array('bill','bob','jill');
foreach($dirName as $directory) {
// copy file 1
copy($_SERVER['DOCUMENT_ROOT']."/base/file1.php",$_SERVER['DOCUMENT_ROOT']."/".$directory."/file1.php"
// update file 2
// update file 3 e.t.c..
}
The base directory will contain the most updated version of the program.