forked from extern/egroupware
automatic updating OBS checkout
This commit is contained in:
parent
11183a763d
commit
6008620034
@ -114,6 +114,13 @@ function do_obs()
|
|||||||
{
|
{
|
||||||
global $config,$verbose;
|
global $config,$verbose;
|
||||||
|
|
||||||
|
if (!is_dir($config['obs']))
|
||||||
|
{
|
||||||
|
usage("Path '$config[obs]' not found!");
|
||||||
|
}
|
||||||
|
if ($verbose) echo "Updating OBS checkout\n";
|
||||||
|
run_cmd('osc up '.$config['obs']);
|
||||||
|
|
||||||
$n = 0;
|
$n = 0;
|
||||||
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($config['obs'])) as $path)
|
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($config['obs'])) as $path)
|
||||||
{
|
{
|
||||||
@ -131,7 +138,12 @@ function do_obs()
|
|||||||
++$n;
|
++$n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($n) echo "$n files replaced in $config[obs] --> commit them now: osc addremove; osc commit\n";
|
if ($n)
|
||||||
|
{
|
||||||
|
echo "$n files updated in OBS checkout ($config[obs]), commting them now...\n";
|
||||||
|
run_cmd('osc addremove '.$config['obs'].'/*');
|
||||||
|
run_cmd('osc commit '.$config['obs']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user