diff --git a/svn-helper.php b/svn-helper.php new file mode 100755 index 0000000000..c049b9ad6d --- /dev/null +++ b/svn-helper.php @@ -0,0 +1,34 @@ +#!/usr/bin/php + +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); +}