From c085444a03c9624d08d03e1b1d9a15e0dc074fd2 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 18 Sep 2015 08:27:28 -0400 Subject: [PATCH] In packaging, use API for gunzip instead of executable (bug 6415). --- tools/buildbot/package.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/buildbot/package.pl b/tools/buildbot/package.pl index 611464fd..d47d38e4 100755 --- a/tools/buildbot/package.pl +++ b/tools/buildbot/package.pl @@ -5,6 +5,7 @@ use Cwd; use File::Basename; use File::stat; use Net::FTP; +use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; use Time::localtime; my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path, $tag); @@ -78,8 +79,12 @@ else print "Reusing existing GeoIP.dat\n"; } -system('gunzip -c ../GeoIP.dat.gz > addons/sourcemod/configs/geoip/GeoIP.dat'); - +my $geoIPfile = 'addons/sourcemod/configs/geoip/GeoIP.dat'; +if (-e $geoIPfile) { + unlink($geoIPfile); +} +gunzip '../GeoIP.dat.gz' => $geoIPfile + or die "gunzip failed: $GunzipError\n"; my ($version);