sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit b2411f3603df06f53de8b303dcccaeb62baac303
parent 0720fc4a35284b99c2f7f619b0c0ffb4b3202449
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Mon, 20 Jun 2016 00:31:28 +0200

Test::Sbotools: replace system(mv) with rename() builtin

Diffstat:
Mt/Test/Sbotools.pm | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/Test/Sbotools.pm b/t/Test/Sbotools.pm @@ -59,7 +59,7 @@ sub set_repo { _set_config('REPO', @_); if (-e "/usr/sbo/repo" and not $repo) { $repo = 1; - system(qw! mv /usr/sbo/repo !, "$RealBin/repo.backup"); + rename '/usr/sbo/repo', "$RealBin/repo.backup"; # if $sbt is true, the SLACKBUILDS.TXT has been created by # make_slackbuilds_txt and should not be backed up @@ -117,7 +117,7 @@ sub replace_tags_txt { if (-e $tags_txt) { if (! $tags) { $tags = 2; - system('mv', $tags_txt, "$tags_txt.bak"); + rename $tags_txt, "$tags_txt.bak"; } } else { $tags = 1 if $tags == 0; @@ -141,11 +141,11 @@ END { system(qw!rm -rf !, $tags_txt); } if ($tags == 2) { - system('mv', "$tags_txt.bak", $tags_txt); + rename "$tags_txt.bak", $tags_txt; } if ($repo) { system(qw! rm -rf /usr/sbo/repo !); - system('mv', "$RealBin/repo.backup", "/usr/sbo/repo"); + rename "$RealBin/repo.backup", "/usr/sbo/repo"; } }