additional_plugins/gitclone.php

25 lines
563 B
PHP
Raw Normal View History

2011-12-13 13:19:36 +01:00
<?php
chdir(dirname(__FILE__));
$out = explode("\n", `cvs -n -q update`);
foreach($out AS $file) {
$file = trim($file);
if (empty($file)) continue;
if (preg_match('@^\? @', $file)) {
$file = str_replace('? ', '', $file);
echo "CVS ADD $file\n";
2011-12-25 00:33:46 +01:00
`cvs add -kk $file`;
2012-03-26 12:19:12 +02:00
`find $file -type d -not -name CVS -exec cvs add {} \;`;
2011-12-25 00:33:46 +01:00
`find $file -type f -exec cvs add -kk {} \;`;
2011-12-13 13:19:36 +01:00
} elseif (preg_match('@^U @', $file)) {
$file = str_replace('U ', '', $file);
echo "CVS RM $file\n";
`cvs rm $file`;
}
}
2011-12-14 09:20:14 +01:00
2011-12-16 17:23:10 +01:00
`cvs -q commit -m "gitclone.sh autocommit"`;
2011-12-14 09:20:14 +01:00