From 7ee9859babb831c8043616e61e874b4c2f4597a5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 10 Aug 2010 07:40:12 +0000 Subject: [PATCH] remove trailing newlines --- doc/rpm-build/checkout-build-archives.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/rpm-build/checkout-build-archives.php b/doc/rpm-build/checkout-build-archives.php index 3f9f006af8..ca2a0647b6 100755 --- a/doc/rpm-build/checkout-build-archives.php +++ b/doc/rpm-build/checkout-build-archives.php @@ -160,6 +160,11 @@ function do_editsvnchangelog() $cmd = $config['editor'].' '.escapeshellarg($logfile); passthru($cmd); $config['changelog'] = file_get_contents($logfile); + // remove trailing newlines + while (substr($config['changelog'],-1) == "\n") + { + $config['changelog'] = substr($config['changelog'],0,-1); + } // allow user to abort, by deleting the changelog if (strlen($config['changelog']) <= 2) {