From d2d568ebf3be1a059dc8d47a65fa1b37e6a76d9c Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sat, 2 Feb 2008 05:51:18 +0100 Subject: [PATCH] Avoid extra copy, move, removal. --- pristine-bz2 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pristine-bz2 b/pristine-bz2 index 0e1c7d4..e86629f 100755 --- a/pristine-bz2 +++ b/pristine-bz2 @@ -263,11 +263,9 @@ sub genbz2 { } close IN; - # arbitrary? - my $filename='arbitrary'; - doit("cp", $file, "$tempdir/$filename"); - doit($program, @params, "$tempdir/$filename"); - doit("mv", "-f", "$tempdir/$filename.bz2", "$file.bz2"); + # compress only + doit($program, @params, $file); + # with other bzip2 programs, the original might stay, making sure doit("rm", "-f", $file); } -- 2.7.4