[dev] Automated CVS Upgrade

Martin Fraser mdf at darksnow.net
Wed Apr 4 16:08:54 UTC 2007


I don't know if anyone else was using this script, but I found that if 
the install-packages.php file was not executable it would not run, 
obviously, so I've changed my script to execute a second PHP processor 
to read the file rather than relying on the #! at the start of the file. 
  I also added a couple of process pipe handling cleanups.

Cheers.

124c124
<         $prc = proc_open($ins, $descriptorspec, $pipes);
---
 >         $prc = proc_open('php '.$ins, $descriptorspec, $pipes);
126a127
 >             fclose($pipes[0]);
129c130,133
<                 if (strstr($line,'Installing') == $line) { echo '.';}
---
 >                 $lineStart = 'Installing';
 >                 if (strstr($line,$lineStart) == $line) {
 >                     echo 
substr($line,strlen($lineStart)+1,strlen($line)-(strlen($lineStart)+2));
 >                 }
131c135,137
<             proc_close($prc);
---
 >             fclose($pipes[1]);
 >             fclose($pipes[2]);
 >             $result = proc_close($prc);


Martin Fraser wrote:
> Hey all.
> 
> I've created a little script that allows me to upgrade my horde 
> installation from CVS.
> 
> It runs the CVS update command then runs install-framework
> 
> Finally, it regenerates any out of date config files.
> 
> Some other people may find this handy so please find it attached.
> 
> I'm planning to expand this to a more full features automated 
> installation routine, again using a CVS client, to make deployment and 
> updating easy (CVS seemed like the way to go for that).
> 
> Comments welcome.
> 
> Martin...



More information about the dev mailing list