mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
small svn-helper script to deal easier with our wired svn-structure, without arguments it reveals it's secrects ;-)
This commit is contained in:
parent
5278ea7463
commit
f69497bece
34
svn-helper.php
Executable file
34
svn-helper.php
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) die("This is a commandline ONLY tool!\n");
|
||||
|
||||
if ($_SERVER['argc'] <= 1) die('
|
||||
Usage: ./svn-helper.php <svn-arguments>
|
||||
Changes into the directory of each module and executes svn with the given arguments. \\$module get\'s replaced with the module name.
|
||||
Examples:
|
||||
- to merge all changes from trunk between revision 123 and 456 into all modules in the workingcopy:
|
||||
./svn-helper.php merge -r 123:456 http://svn.egroupware.org/egroupware/trunk/\\$module
|
||||
- to switch a workingcopy to the 1.4 branch:
|
||||
./svn-helper.php switch http://svn.egroupware.org/egroupware/branches/1.4/\\$module
|
||||
- to switch an anonymous workingcopy to a developers one:
|
||||
./svn-helper.php switch --relocate http://svn.egroupware.org svn+ssh://svn@dev.egroupware.org
|
||||
'."\n");
|
||||
|
||||
$d = opendir($dir=dirname(__FILE__));
|
||||
|
||||
while (($file = readdir($d)) !== false)
|
||||
{
|
||||
$path = $dir . '/'. $file;
|
||||
if (!is_dir($path) || in_array($file,array('debian','home','doc','..','.svn'))) continue;
|
||||
|
||||
chdir($path);
|
||||
|
||||
$args = $_SERVER['argv'];
|
||||
array_shift($args);
|
||||
$args = implode(' ',$args);
|
||||
$args = str_replace('$module',$file == '.' ? 'egroupware' : $file,$args);
|
||||
|
||||
echo "$file: svn $args\n";
|
||||
system('svn '.$args);
|
||||
}
|
Loading…
Reference in New Issue
Block a user