Skip to content

Commit

Permalink
Fix unpacking of GeoLite2 database (#1516)
Browse files Browse the repository at this point in the history
Apparently you can't unpack and uncompress in one go in Windows and tar -C doesn't affect the input file.
  • Loading branch information
peace-maker committed Jun 30, 2021
1 parent b0563a4 commit d192527
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/buildbot/package.pl
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@
}
close($fh);

unless (-e '../GeoLite2-City_20191217.tar.gz')
unless (-e '../GeoLite2-City_20191217.tar')
{
print "Downloading GeoLite2-City.mmdb...\n";
# Don't check certificate. It will fail on the slaves and we're resolving to internal addressing anyway
system('wget --no-check-certificate -q -O ../GeoLite2-City_20191217.tar.gz https://sm.alliedmods.net/GeoLite2-City_20191217.tar.gz');
system('tar -C ../ -xzf GeoLite2-City_20191217.tar.gz');
system('gunzip ../GeoLite2-City_20191217.tar.gz');
system('tar -C ../ -xf ../GeoLite2-City_20191217.tar');
copy('../GeoLite2-City_20191217/GeoLite2-City.mmdb', 'addons/sourcemod/configs/geoip/GeoLite2-City.mmdb');
}
else
Expand Down

0 comments on commit d192527

Please sign in to comment.