From 634e44873b1d1c3ae709eaaadc6daa85ef8cd0f9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 25 May 2010 20:53:22 +0000 Subject: [PATCH] also ignoring empty lines and adding to svn cp --parent -m "creating $svntag" --- doc/rpm-build/checkout-build-archives.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/rpm-build/checkout-build-archives.php b/doc/rpm-build/checkout-build-archives.php index cff7a03398..c10765aff9 100755 --- a/doc/rpm-build/checkout-build-archives.php +++ b/doc/rpm-build/checkout-build-archives.php @@ -459,8 +459,9 @@ function do_svntag() $config['modules'] = array(); foreach($output as $line) { - if ($line[0] == '#') continue; - list($path,$url) = preg_split('/[ \t\r\n]+/',trim($line)); + $line = trim($line); + if (empty($line) || $line[0] == '#') continue; + list($path,$url) = preg_split('/[ \t\r\n]+/',$line); if (!preg_match('/([a-z+]+:\/\/[a-z@.]+\/[a-z]+)\/(branches|tags|trunk)/',$url,$matches)) die("Invalid SVN URL: $url\n"); $repo = $matches[1]; $config['modules'][$repo][$path] = $url; @@ -483,7 +484,7 @@ function do_svntag() foreach($config['modules'] as $repo => $modules) { if ($repo == 'http://svn.egroupware.org/egroupware') $repo = 'svn+ssh://svn@dev.egroupware.org/egroupware'; - $cmd = $svn.' cp '.implode(' ',$modules).' '.$repo.'/'.$config['svntag'].'/'; + $cmd = $svn.' cp --parents -m '.escapeshellarg('Creating '.$config['svntag']).' '.implode(' ',$modules).' '.$repo.'/'.$config['svntag'].'/'; run_cmd($cmd); } }